diff src/http/modules/ngx_http_dav_module.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 9079ee4735ae
line wrap: on
line diff
--- a/src/http/modules/ngx_http_dav_module.c
+++ b/src/http/modules/ngx_http_dav_module.c
@@ -116,10 +116,6 @@ ngx_http_dav_handler(ngx_http_request_t 
             return NGX_DECLINED;
         }
 
-        if (r->headers_in.content_length_n < 0) {
-            return NGX_HTTP_BAD_REQUEST;
-        }
-
         r->request_body_in_file_only = 1;
         r->request_body_in_persistent_file = 1;
         r->request_body_delete_incomplete_file = 1;
@@ -312,6 +308,8 @@ ok:
             ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
             return;
         }
+
+        r->headers_out.content_length_n = 0;
     }
 
     r->headers_out.status = status;