Mercurial > hg > nginx-mail
comparison src/http/modules/ngx_http_realip_module.c @ 587:40c366b3535c NGINX_0_8_24
nginx 0.8.24
*) Bugfix: nginx always added "Content-Encoding: gzip" response header
line in 304 responses sent by ngx_http_gzip_static_module.
*) Bugfix: nginx could not be built without the --with-debug option;
the bug had appeared in 0.8.23.
*) Bugfix: the "unix:" parameter of the "set_real_ip_from" directive
inherited incorrectly from previous level.
*) Bugfix: in resolving empty name.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 11 Nov 2009 00:00:00 +0300 |
parents | 2b9e388c61f1 |
children |
comparison
equal
deleted
inserted
replaced
586:48b3f4b6bc38 | 587:40c366b3535c |
---|---|
24 ngx_array_t *from; /* array of ngx_http_realip_from_t */ | 24 ngx_array_t *from; /* array of ngx_http_realip_from_t */ |
25 ngx_uint_t type; | 25 ngx_uint_t type; |
26 ngx_uint_t hash; | 26 ngx_uint_t hash; |
27 ngx_str_t header; | 27 ngx_str_t header; |
28 #if (NGX_HAVE_UNIX_DOMAIN) | 28 #if (NGX_HAVE_UNIX_DOMAIN) |
29 ngx_uint_t unixsock; /* unsigned unixsock:1; */ | 29 ngx_uint_t unixsock; /* unsigned unixsock:2; */ |
30 #endif | 30 #endif |
31 } ngx_http_realip_loc_conf_t; | 31 } ngx_http_realip_loc_conf_t; |
32 | 32 |
33 | 33 |
34 typedef struct { | 34 typedef struct { |
409 * set by ngx_pcalloc(): | 409 * set by ngx_pcalloc(): |
410 * | 410 * |
411 * conf->from = NULL; | 411 * conf->from = NULL; |
412 * conf->hash = 0; | 412 * conf->hash = 0; |
413 * conf->header = { 0, NULL }; | 413 * conf->header = { 0, NULL }; |
414 * conf->unixsock = 0; | |
415 */ | 414 */ |
416 | 415 |
417 conf->type = NGX_CONF_UNSET_UINT; | 416 conf->type = NGX_CONF_UNSET_UINT; |
417 #if (NGX_HAVE_UNIX_DOMAIN) | |
418 conf->unixsock = 2; | |
419 #endif | |
418 | 420 |
419 return conf; | 421 return conf; |
420 } | 422 } |
421 | 423 |
422 | 424 |
426 ngx_http_realip_loc_conf_t *prev = parent; | 428 ngx_http_realip_loc_conf_t *prev = parent; |
427 ngx_http_realip_loc_conf_t *conf = child; | 429 ngx_http_realip_loc_conf_t *conf = child; |
428 | 430 |
429 if (conf->from == NULL) { | 431 if (conf->from == NULL) { |
430 conf->from = prev->from; | 432 conf->from = prev->from; |
431 #if (NGX_HAVE_UNIX_DOMAIN) | 433 } |
432 conf->unixsock = prev->unixsock; | 434 |
433 #endif | 435 #if (NGX_HAVE_UNIX_DOMAIN) |
434 } | 436 if (conf->unixsock == 2) { |
437 conf->unixsock = (prev->unixsock == 2) ? 0 : prev->unixsock; | |
438 } | |
439 #endif | |
435 | 440 |
436 ngx_conf_merge_uint_value(conf->type, prev->type, NGX_HTTP_REALIP_XREALIP); | 441 ngx_conf_merge_uint_value(conf->type, prev->type, NGX_HTTP_REALIP_XREALIP); |
437 | 442 |
438 if (conf->header.len == 0) { | 443 if (conf->header.len == 0) { |
439 conf->hash = prev->hash; | 444 conf->hash = prev->hash; |