From 3362b8df048ad32b6dd286b37e792f661bb894ea Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sat, 14 May 2005 18:42:03 +0000 Subject: nginx-0.1.30-RELEASE import *) 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. --- src/http/ngx_http_request.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/http/ngx_http_request.c') 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); -- cgit v1.2.3