]> git.kaiwu.me - nginx.git/commitdiff
allow POST without Content-Length
authorIgor Sysoev <igor@sysoev.ru>
Mon, 8 Dec 2008 14:04:31 +0000 (14:04 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 8 Dec 2008 14:04:31 +0000 (14:04 +0000)
src/http/ngx_http_request.c

index ab4c0e08fa3cf3e712c7a5d2cd4ead1bf31bfe4a..996276777a7bd2ff3bf4983a63b392e0fef663ad 100644 (file)
@@ -1411,9 +1411,7 @@ ngx_http_process_request_header(ngx_http_request_t *r)
         }
     }
 
-    if (r->method & (NGX_HTTP_POST|NGX_HTTP_PUT)
-        && r->headers_in.content_length_n == -1)
-    {
+    if (r->method & NGX_HTTP_PUT && r->headers_in.content_length_n == -1) {
         ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
                   "client sent %V method without \"Content-Length\" header",
                   &r->method_name);