nginxtra 1.2.1.3 → 1.2.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/VERSION +1 -1
  2. data/bin/nginxtra +1 -1
  3. data/src/nginx/CHANGES +60 -0
  4. data/src/nginx/CHANGES.ru +57 -0
  5. data/src/nginx/auto/{endianess → endianness} +5 -5
  6. data/src/nginx/auto/lib/google-perftools/conf +16 -0
  7. data/src/nginx/auto/modules +10 -0
  8. data/src/nginx/auto/options +3 -0
  9. data/src/nginx/auto/os/conf +2 -0
  10. data/src/nginx/auto/sources +5 -0
  11. data/src/nginx/auto/unix +1 -1
  12. data/src/nginx/src/core/nginx.h +2 -2
  13. data/src/nginx/src/core/ngx_hash.c +13 -11
  14. data/src/nginx/src/core/ngx_inet.c +32 -31
  15. data/src/nginx/src/core/ngx_regex.c +3 -3
  16. data/src/nginx/src/core/ngx_regex.h +2 -2
  17. data/src/nginx/src/core/ngx_resolver.c +22 -16
  18. data/src/nginx/src/event/ngx_event_openssl.c +18 -1
  19. data/src/nginx/src/http/modules/ngx_http_geo_module.c +1 -1
  20. data/src/nginx/src/http/modules/ngx_http_geoip_module.c +15 -4
  21. data/src/nginx/src/http/modules/ngx_http_log_module.c +3 -6
  22. data/src/nginx/src/http/modules/ngx_http_mp4_module.c +18 -1
  23. data/src/nginx/src/http/modules/ngx_http_rewrite_module.c +6 -0
  24. data/src/nginx/src/http/modules/ngx_http_split_clients_module.c +7 -0
  25. data/src/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c +44 -17
  26. data/src/nginx/src/http/modules/ngx_http_upstream_keepalive_module.c +4 -29
  27. data/src/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c +402 -0
  28. data/src/nginx/src/http/modules/ngx_http_xslt_filter_module.c +2 -2
  29. data/src/nginx/src/http/modules/perl/nginx.pm +1 -1
  30. data/src/nginx/src/http/modules/perl/nginx.xs +1 -1
  31. data/src/nginx/src/http/ngx_http_core_module.c +1 -1
  32. data/src/nginx/src/http/ngx_http_header_filter_module.c +2 -2
  33. data/src/nginx/src/http/ngx_http_request.c +1 -1
  34. data/src/nginx/src/http/ngx_http_request.h +8 -1
  35. data/src/nginx/src/http/ngx_http_upstream.c +15 -1
  36. data/src/nginx/src/http/ngx_http_upstream_round_robin.c +11 -1
  37. data/src/nginx/src/http/ngx_http_upstream_round_robin.h +5 -1
  38. data/src/nginx/src/http/ngx_http_variables.c +49 -3
  39. data/src/nginx/src/os/unix/ngx_errno.c +1 -1
  40. data/src/nginx/src/os/unix/ngx_errno.h +1 -1
  41. data/src/nginx/src/os/unix/ngx_freebsd_init.c +2 -2
  42. data/src/nginx/src/os/unix/ngx_posix_config.h +1 -0
  43. data/src/nginx/src/os/unix/ngx_process_cycle.c +4 -0
  44. metadata +5 -4
@@ -77,6 +77,8 @@ static ngx_int_t ngx_http_variable_request_body(ngx_http_request_t *r,
77
77
  ngx_http_variable_value_t *v, uintptr_t data);
78
78
  static ngx_int_t ngx_http_variable_request_body_file(ngx_http_request_t *r,
79
79
  ngx_http_variable_value_t *v, uintptr_t data);
80
+ static ngx_int_t ngx_http_variable_status(ngx_http_request_t *r,
81
+ ngx_http_variable_value_t *v, uintptr_t data);
80
82
 
81
83
  static ngx_int_t ngx_http_variable_sent_content_type(ngx_http_request_t *r,
82
84
  ngx_http_variable_value_t *v, uintptr_t data);
@@ -132,7 +134,7 @@ static ngx_http_variable_t ngx_http_core_variables[] = {
132
134
  offsetof(ngx_http_request_t, headers_in.via), 0, 0 },
133
135
  #endif
134
136
 
135
- #if (NGX_HTTP_PROXY || NGX_HTTP_REALIP)
137
+ #if (NGX_HTTP_X_FORWARDED_FOR)
136
138
  { ngx_string("http_x_forwarded_for"), NULL, ngx_http_variable_header,
137
139
  offsetof(ngx_http_request_t, headers_in.x_forwarded_for), 0, 0 },
138
140
  #endif
@@ -225,6 +227,10 @@ static ngx_http_variable_t ngx_http_core_variables[] = {
225
227
  ngx_http_variable_request_body_file,
226
228
  0, 0, 0 },
227
229
 
230
+ { ngx_string("status"), NULL,
231
+ ngx_http_variable_status, 0,
232
+ NGX_HTTP_VAR_NOCACHEABLE, 0 },
233
+
228
234
  { ngx_string("sent_http_content_type"), NULL,
229
235
  ngx_http_variable_sent_content_type, 0, 0, 0 },
230
236
 
@@ -1455,6 +1461,39 @@ ngx_http_variable_body_bytes_sent(ngx_http_request_t *r,
1455
1461
  }
1456
1462
 
1457
1463
 
1464
+ static ngx_int_t
1465
+ ngx_http_variable_status(ngx_http_request_t *r,
1466
+ ngx_http_variable_value_t *v, uintptr_t data)
1467
+ {
1468
+ ngx_uint_t status;
1469
+
1470
+ v->data = ngx_pnalloc(r->pool, NGX_INT_T_LEN);
1471
+ if (v->data == NULL) {
1472
+ return NGX_ERROR;
1473
+ }
1474
+
1475
+ if (r->err_status) {
1476
+ status = r->err_status;
1477
+
1478
+ } else if (r->headers_out.status) {
1479
+ status = r->headers_out.status;
1480
+
1481
+ } else if (r->http_version == NGX_HTTP_VERSION_9) {
1482
+ status = 9;
1483
+
1484
+ } else {
1485
+ status = 0;
1486
+ }
1487
+
1488
+ v->len = ngx_sprintf(v->data, "%03ui", status) - v->data;
1489
+ v->valid = 1;
1490
+ v->no_cacheable = 0;
1491
+ v->not_found = 0;
1492
+
1493
+ return NGX_OK;
1494
+ }
1495
+
1496
+
1458
1497
  static ngx_int_t
1459
1498
  ngx_http_variable_sent_content_type(ngx_http_request_t *r,
1460
1499
  ngx_http_variable_value_t *v, uintptr_t data)
@@ -2016,7 +2055,7 @@ ngx_int_t
2016
2055
  ngx_http_variables_add_core_vars(ngx_conf_t *cf)
2017
2056
  {
2018
2057
  ngx_int_t rc;
2019
- ngx_http_variable_t *v;
2058
+ ngx_http_variable_t *cv, *v;
2020
2059
  ngx_http_core_main_conf_t *cmcf;
2021
2060
 
2022
2061
  cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module);
@@ -2036,7 +2075,14 @@ ngx_http_variables_add_core_vars(ngx_conf_t *cf)
2036
2075
  return NGX_ERROR;
2037
2076
  }
2038
2077
 
2039
- for (v = ngx_http_core_variables; v->name.len; v++) {
2078
+ for (cv = ngx_http_core_variables; cv->name.len; cv++) {
2079
+ v = ngx_palloc(cf->pool, sizeof(ngx_http_variable_t));
2080
+ if (v == NULL) {
2081
+ return NGX_ERROR;
2082
+ }
2083
+
2084
+ *v = *cv;
2085
+
2040
2086
  rc = ngx_hash_add_key(cmcf->variables_keys, &v->name, v,
2041
2087
  NGX_HASH_READONLY_KEY);
2042
2088
 
@@ -42,7 +42,7 @@ ngx_strerror(ngx_err_t err, u_char *errstr, size_t size)
42
42
  }
43
43
 
44
44
 
45
- ngx_uint_t
45
+ ngx_int_t
46
46
  ngx_strerror_init(void)
47
47
  {
48
48
  char *msg;
@@ -69,7 +69,7 @@ typedef int ngx_err_t;
69
69
 
70
70
 
71
71
  u_char *ngx_strerror(ngx_err_t err, u_char *errstr, size_t size);
72
- ngx_uint_t ngx_strerror_init(void);
72
+ ngx_int_t ngx_strerror_init(void);
73
73
 
74
74
 
75
75
  #endif /* _NGX_ERRNO_H_INCLUDED_ */
@@ -76,9 +76,9 @@ ngx_debug_init()
76
76
  {
77
77
  #if (NGX_DEBUG_MALLOC)
78
78
 
79
- #if __FreeBSD_version >= 500014
79
+ #if __FreeBSD_version >= 500014 && __FreeBSD_version < 1000011
80
80
  _malloc_options = "J";
81
- #else
81
+ #elif __FreeBSD_version < 500014
82
82
  malloc_options = "J";
83
83
  #endif
84
84
 
@@ -12,6 +12,7 @@
12
12
  #if (NGX_HPUX)
13
13
  #define _XOPEN_SOURCE
14
14
  #define _XOPEN_SOURCE_EXTENDED 1
15
+ #define _HPUX_ALT_XOPEN_SOCKET_API
15
16
  #endif
16
17
 
17
18
 
@@ -711,6 +711,8 @@ ngx_master_process_exit(ngx_cycle_t *cycle)
711
711
  ngx_exit_log.file = &ngx_exit_log_file;
712
712
 
713
713
  ngx_exit_cycle.log = &ngx_exit_log;
714
+ ngx_exit_cycle.files = ngx_cycle->files;
715
+ ngx_exit_cycle.files_n = ngx_cycle->files_n;
714
716
  ngx_cycle = &ngx_exit_cycle;
715
717
 
716
718
  ngx_destroy_pool(cycle->pool);
@@ -1054,6 +1056,8 @@ ngx_worker_process_exit(ngx_cycle_t *cycle)
1054
1056
  ngx_exit_log.file = &ngx_exit_log_file;
1055
1057
 
1056
1058
  ngx_exit_cycle.log = &ngx_exit_log;
1059
+ ngx_exit_cycle.files = ngx_cycle->files;
1060
+ ngx_exit_cycle.files_n = ngx_cycle->files_n;
1057
1061
  ngx_cycle = &ngx_exit_cycle;
1058
1062
 
1059
1063
  ngx_destroy_pool(cycle->pool);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nginxtra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1.3
4
+ version: 1.2.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-07-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &10532080 !ruby/object:Gem::Requirement
16
+ requirement: &18131880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 0.15.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *10532080
24
+ version_requirements: *18131880
25
25
  description: This gem is intended to provide an easy to use configuration file that
26
26
  will automatically be used to compile nginx and configure the configuration.
27
27
  email: reasonnumber@gmail.com
@@ -62,7 +62,7 @@ files:
62
62
  - src/nginx/auto/cc/owc
63
63
  - src/nginx/auto/cc/sunc
64
64
  - src/nginx/auto/define
65
- - src/nginx/auto/endianess
65
+ - src/nginx/auto/endianness
66
66
  - src/nginx/auto/feature
67
67
  - src/nginx/auto/have
68
68
  - src/nginx/auto/have_headers
@@ -272,6 +272,7 @@ files:
272
272
  - src/nginx/src/http/modules/ngx_http_sub_filter_module.c
273
273
  - src/nginx/src/http/modules/ngx_http_upstream_ip_hash_module.c
274
274
  - src/nginx/src/http/modules/ngx_http_upstream_keepalive_module.c
275
+ - src/nginx/src/http/modules/ngx_http_upstream_least_conn_module.c
275
276
  - src/nginx/src/http/modules/ngx_http_userid_filter_module.c
276
277
  - src/nginx/src/http/modules/ngx_http_uwsgi_module.c
277
278
  - src/nginx/src/http/modules/ngx_http_xslt_filter_module.c