]> git.kaiwu.me - nginx.git/commitdiff
change status code and add log message
authorIgor Sysoev <igor@sysoev.ru>
Sun, 30 Dec 2007 09:44:02 +0000 (09:44 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 30 Dec 2007 09:44:02 +0000 (09:44 +0000)
src/http/modules/ngx_http_dav_module.c

index bfb12db67d8d7239030ce6f6b308751f65131dc1..8c45e6441eef7c2958343528f2b71c83720c8426 100644 (file)
@@ -153,7 +153,9 @@ ngx_http_dav_handler(ngx_http_request_t *r)
     case NGX_HTTP_PUT:
 
         if (r->uri.data[r->uri.len - 1] == '/') {
-            return NGX_HTTP_BAD_REQUEST;
+            ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+                          "can not PUT to a collection");
+            return NGX_HTTP_CONFLICT;
         }
 
         r->request_body_in_file_only = 1;