aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.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_request.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_request.c')
-rw-r--r--src/http/ngx_http_request.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 28412b656..4cbf91581 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -725,6 +725,7 @@ ngx_http_process_request_headers(ngx_event_t *rev)
ngx_connection_t *c;
ngx_http_header_t *hh;
ngx_http_request_t *r;
+ ngx_http_core_srv_conf_t *cscf;
ngx_http_core_main_conf_t *cmcf;
c = rev->data;
@@ -742,6 +743,7 @@ ngx_http_process_request_headers(ngx_event_t *rev)
}
cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
+ cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module);
hh = (ngx_http_header_t *) cmcf->headers_in_hash.buckets;
rc = NGX_AGAIN;
@@ -783,8 +785,7 @@ ngx_http_process_request_headers(ngx_event_t *rev)
if (rc == NGX_OK) {
-#if 0
- if (r->invalid_header) {
+ if (r->invalid_header && cscf->ignore_invalid_headers) {
/* there was error while a header line parsing */
@@ -796,7 +797,6 @@ ngx_http_process_request_headers(ngx_event_t *rev)
&header);
continue;
}
-#endif
/* a header line has been parsed successfully */
@@ -1406,7 +1406,9 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http finalize request: %d, \"%V\"", rc, &r->uri);
- if (r->parent && rc >= NGX_HTTP_SPECIAL_RESPONSE) {
+ if (r->parent
+ && (rc >= NGX_HTTP_SPECIAL_RESPONSE || rc == NGX_HTTP_NO_CONTENT))
+ {
ngx_http_finalize_request(r, ngx_http_special_response_handler(r, rc));
return;
}
@@ -1450,7 +1452,7 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
return;
}
- if (rc >= NGX_HTTP_SPECIAL_RESPONSE) {
+ if (rc >= NGX_HTTP_SPECIAL_RESPONSE || rc == NGX_HTTP_NO_CONTENT) {
if (r->connection->read->timer_set) {
ngx_del_timer(r->connection->read);