comparison src/http/ngx_http_request.c @ 2370:44039da1fae8

allow POST without Content-Length
author Igor Sysoev <igor@sysoev.ru>
date Mon, 08 Dec 2008 14:04:31 +0000
parents ce574b0ffeec
children 87b8c44906b5
comparison
equal deleted inserted replaced
2366:3aa4fd0e7dc5 2370:44039da1fae8
1409 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); 1409 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED);
1410 return NGX_ERROR; 1410 return NGX_ERROR;
1411 } 1411 }
1412 } 1412 }
1413 1413
1414 if (r->method & (NGX_HTTP_POST|NGX_HTTP_PUT) 1414 if (r->method & NGX_HTTP_PUT && r->headers_in.content_length_n == -1) {
1415 && r->headers_in.content_length_n == -1)
1416 {
1417 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, 1415 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
1418 "client sent %V method without \"Content-Length\" header", 1416 "client sent %V method without \"Content-Length\" header",
1419 &r->method_name); 1417 &r->method_name);
1420 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED); 1418 ngx_http_finalize_request(r, NGX_HTTP_LENGTH_REQUIRED);
1421 return NGX_ERROR; 1419 return NGX_ERROR;