mirror of https://github.com/nginx/nginx
apply patch
This commit is contained in:
parent
35c44af58a
commit
ade4647f7b
|
|
@ -175,6 +175,11 @@ ngx_http_dav_handler(ngx_http_request_t *r)
|
|||
|
||||
rc = ngx_http_read_client_request_body(r, ngx_http_dav_put_handler);
|
||||
|
||||
if (rc == NGX_HTTP_INTERNAL_SERVER_ERROR) {
|
||||
return ngx_http_dav_error(NULL, ngx_errno, NGX_HTTP_CONFLICT,
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
if (rc >= NGX_HTTP_SPECIAL_RESPONSE) {
|
||||
return rc;
|
||||
}
|
||||
|
|
@ -207,6 +212,7 @@ ngx_http_dav_put_handler(ngx_http_request_t *r)
|
|||
{
|
||||
size_t root;
|
||||
time_t date;
|
||||
ngx_int_t rc;
|
||||
ngx_str_t *temp, path;
|
||||
ngx_uint_t status;
|
||||
ngx_file_info_t fi;
|
||||
|
|
@ -280,10 +286,7 @@ ngx_http_dav_put_handler(ngx_http_request_t *r)
|
|||
}
|
||||
|
||||
if (ngx_ext_rename_file(temp, &path, &ext) != NGX_OK) {
|
||||
ngx_int_t rc;
|
||||
rc = ngx_http_dav_error(r->connection->log, ngx_errno,
|
||||
NGX_HTTP_NOT_FOUND, ngx_rename_file_n,
|
||||
path.data);
|
||||
rc = ngx_http_dav_error(NULL, ngx_errno, NGX_HTTP_CONFLICT, NULL, NULL);
|
||||
ngx_http_finalize_request(r, rc);
|
||||
return;
|
||||
}
|
||||
|
|
@ -1067,7 +1070,9 @@ ngx_http_dav_error(ngx_log_t *log, ngx_err_t err, ngx_int_t not_found,
|
|||
rc = NGX_HTTP_INTERNAL_SERVER_ERROR;
|
||||
}
|
||||
|
||||
ngx_log_error(level, log, err, "%s \"%s\" failed", failed, path);
|
||||
if (log) {
|
||||
ngx_log_error(level, log, err, "%s \"%s\" failed", failed, path);
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue