Skip to content

Commit

Permalink
If request method is not POST return HTTP 405 in order to simplify co…
Browse files Browse the repository at this point in the history
…nfiguration.
  • Loading branch information
Valery Kholodkov committed Nov 25, 2009
1 parent d8b1a57 commit b594115
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

Version 2.0.12
* Fixed bug: keepalive connection was hanging after upload has been completed.
* Change: if request method is not POST return HTTP 405 in order to simplify configuration.

Version 2.0.11
* Fixed bug: rb->buf was uninitiazlied at some execution paths. Found by Andrew Filonov.
Expand Down
2 changes: 1 addition & 1 deletion ngx_http_upload_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ ngx_http_upload_handler(ngx_http_request_t *r)
ngx_int_t rc;

if (!(r->method & NGX_HTTP_POST))
return NGX_DECLINED;
return NGX_HTTP_NOT_ALLOWED;

ulcf = ngx_http_get_module_loc_conf(r, ngx_http_upload_module);

Expand Down

0 comments on commit b594115

Please sign in to comment.