aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_dav_module.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_dav_module.c b/src/http/modules/ngx_http_dav_module.c
index 566b08ba1..55ad9eb19 100644
--- a/src/http/modules/ngx_http_dav_module.c
+++ b/src/http/modules/ngx_http_dav_module.c
@@ -213,7 +213,16 @@ ngx_http_dav_put_handler(ngx_http_request_t *r)
ngx_ext_rename_file_t ext;
ngx_http_dav_loc_conf_t *dlcf;
- if (r->request_body == NULL || r->request_body->temp_file == NULL) {
+ if (r->request_body == NULL) {
+ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+ "PUT request body is unavailable");
+ ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
+ return;
+ }
+
+ if (r->request_body->temp_file == NULL) {
+ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
+ "PUT request body must be in a file");
ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
return;
}