changeset 1813:d3f80e0be8fa

change status code and add log message
author Igor Sysoev <igor@sysoev.ru>
date Sun, 30 Dec 2007 09:44:02 +0000
parents 8f8b66a48494
children d466c739b54b
files src/http/modules/ngx_http_dav_module.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_dav_module.c
+++ b/src/http/modules/ngx_http_dav_module.c
@@ -153,7 +153,9 @@ ngx_http_dav_handler(ngx_http_request_t 
     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;