Mercurial > hg > nginx
comparison src/http/ngx_http_request.c @ 2641:3a79007edf41 stable-0.6
r2371 merge:
allow POST without Content-Length
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 01 Apr 2009 16:01:01 +0000 |
parents | 8e4450668968 |
children | 76add0af8e21 |
comparison
equal
deleted
inserted
replaced
2640:a69e3766f698 | 2641:3a79007edf41 |
---|---|
1386 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); | 1386 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); |
1387 return NGX_ERROR; | 1387 return NGX_ERROR; |
1388 } | 1388 } |
1389 } | 1389 } |
1390 | 1390 |
1391 if (r->method & (NGX_HTTP_POST|NGX_HTTP_PUT) | 1391 if (r->method & NGX_HTTP_PUT && r->headers_in.content_length_n == -1) { |
1392 && r->headers_in.content_length_n == -1) | |
1393 { | |
1394 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, | 1392 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, |
1395 "client sent %V method without \"Content-Length\" header", | 1393 "client sent %V method without \"Content-Length\" header", |
1396 &r->method_name); | 1394 &r->method_name); |
1397 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); | 1395 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); |
1398 return NGX_ERROR; | 1396 return NGX_ERROR; |