Mercurial > hg > nginx
diff src/http/ngx_http_request.c @ 639:715d24327080 release-0.3.41
nginx-0.3.41-RELEASE import
*) Feature: the -v switch.
*) Bugfix: the segmentation fault may occurred if the SSI page has
remote subrequests.
*) Bugfix: in FastCGI handling.
*) Bugfix: if the perl modules path was not set using
--with-perl_modules_path=PATH or the "perl_modules", then the
segmentation fault was occurred.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 21 Apr 2006 12:06:44 +0000 |
parents | e60fe4cf1d4e |
children | 5e8fb59c18c1 |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c Wed Apr 19 15:30:56 2006 +0000 +++ b/src/http/ngx_http_request.c Fri Apr 21 12:06:44 2006 +0000 @@ -1218,7 +1218,9 @@ } } - if (r->method == NGX_HTTP_POST && r->headers_in.content_length_n == -1) { + if (r->method & (NGX_HTTP_POST|NGX_HTTP_PUT) + && r->headers_in.content_length_n == -1) + { ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, "client sent POST method without \"Content-Length\" header"); ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); @@ -1432,7 +1434,6 @@ } ngx_http_finalize_request(r, ngx_http_special_response_handler(r, rc)); - return; } @@ -2154,19 +2155,11 @@ static void ngx_http_close_request(ngx_http_request_t *r, ngx_int_t error) { - ngx_connection_t *c; - ngx_http_cleanup_t *cln; + ngx_connection_t *c; c = r->connection; - r = r->main; - - for (cln = r->cleanup; cln; cln = cln->next) { - if (cln->handler) { - cln->handler(cln->data); - } - } - - ngx_http_request_done(r, error); + + ngx_http_request_done(r->main, error); ngx_http_close_connection(c); } @@ -2177,6 +2170,7 @@ ngx_log_t *log; ngx_uint_t i, n; struct linger linger; + ngx_http_cleanup_t *cln; ngx_http_log_ctx_t *ctx; ngx_http_handler_pt *log_handler; ngx_http_core_loc_conf_t *clcf; @@ -2191,6 +2185,12 @@ return; } + for (cln = r->cleanup; cln; cln = cln->next) { + if (cln->handler) { + cln->handler(cln->data); + } + } + #if (NGX_STAT_STUB) if (r->stat_reading) {