aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-05-14 18:42:03 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-05-14 18:42:03 +0000
commit3362b8df048ad32b6dd286b37e792f661bb894ea (patch)
tree4d34588122fdddf2213a44afac03f9100228990d /src/http/ngx_http_core_module.c
parenta599375d3b5ae261d30d292a5eb7939623f6e4b1 (diff)
downloadnginx-release-0.1.30.tar.gz
nginx-release-0.1.30.zip
nginx-0.1.30-RELEASE importrelease-0.1.30
*) Bugfix: the worker process may got caught in an endless loop if the SSI was used. *) Bugfix: the response encrypted by SSL may not transferred complete. *) Bugfix: if the length of the response part received at once from proxied or FastCGI server was equal to 500, then nginx returns the 500 response code; in proxy mode the the bug had appeared in 0.1.29 only. *) Bugfix: nginx did not consider the directives with 8 or 9 parameters as invalid. *) Feature: the "return" directive can return the 204 response code. *) Feature: the "ignore_invalid_headers" directive.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 13aa44032..2a9b3b7e5 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -144,6 +144,13 @@ static ngx_command_t ngx_http_core_commands[] = {
offsetof(ngx_http_core_srv_conf_t, restrict_host_names),
&ngx_http_restrict_host_names },
+ { ngx_string("ignore_invalid_headers"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+ ngx_conf_set_flag_slot,
+ NGX_HTTP_SRV_CONF_OFFSET,
+ offsetof(ngx_http_core_srv_conf_t, ignore_invalid_headers),
+ NULL },
+
{ ngx_string("location"),
NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_BLOCK|NGX_CONF_TAKE12,
ngx_http_core_location,
@@ -505,7 +512,10 @@ ngx_http_core_run_phases(ngx_http_request_t *r)
continue;
}
- if (rc >= NGX_HTTP_SPECIAL_RESPONSE || rc == NGX_ERROR) {
+ if (rc >= NGX_HTTP_SPECIAL_RESPONSE
+ || rc == NGX_HTTP_NO_CONTENT
+ || rc == NGX_ERROR)
+ {
ngx_http_finalize_request(r, rc);
return;
}
@@ -1578,6 +1588,7 @@ ngx_http_core_create_srv_conf(ngx_conf_t *cf)
cscf->client_header_timeout = NGX_CONF_UNSET_MSEC;
cscf->client_header_buffer_size = NGX_CONF_UNSET_SIZE;
cscf->restrict_host_names = NGX_CONF_UNSET_UINT;
+ cscf->ignore_invalid_headers = NGX_CONF_UNSET;
return cscf;
}
@@ -1663,6 +1674,9 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
ngx_conf_merge_unsigned_value(conf->restrict_host_names,
prev->restrict_host_names, 0);
+ ngx_conf_merge_value(conf->ignore_invalid_headers,
+ prev->ignore_invalid_headers, 1);
+
return NGX_CONF_OK;
}