aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_static_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-04-21 12:06:44 +0000
committerIgor Sysoev <igor@sysoev.ru>2006-04-21 12:06:44 +0000
commit4ecb4d721de0d6ddc34dfff4dce294415b64b04b (patch)
treefe9970fbe823741145cee16261003083b31e949d /src/http/modules/ngx_http_static_module.c
parent7d2d90ce71669e5a5ccb91386d0529df39b1c804 (diff)
downloadnginx-release-0.3.41.tar.gz
nginx-release-0.3.41.zip
nginx-0.3.41-RELEASE importrelease-0.3.41
*) Feature: the -v switch. *) Bugfix: the segmentation fault may occurred if the SSI page has remote subrequests. *) Bugfix: in FastCGI handling. *) Bugfix: if the perl modules path was not set using --with-perl_modules_path=PATH or the "perl_modules", then the segmentation fault was occurred.
Diffstat (limited to 'src/http/modules/ngx_http_static_module.c')
-rw-r--r--src/http/modules/ngx_http_static_module.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c
index 0dbec5093..3399e5098 100644
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -86,6 +86,10 @@ ngx_http_static_handler(ngx_http_request_t *r)
ngx_pool_cleanup_file_t *clnf;
ngx_http_core_loc_conf_t *clcf;
+ if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) {
+ return NGX_HTTP_NOT_ALLOWED;
+ }
+
if (r->uri.data[r->uri.len - 1] == '/') {
return NGX_DECLINED;
}
@@ -95,10 +99,6 @@ ngx_http_static_handler(ngx_http_request_t *r)
return NGX_DECLINED;
}
- if (r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) {
- return NGX_HTTP_NOT_ALLOWED;
- }
-
rc = ngx_http_discard_body(r);
if (rc != NGX_OK && rc != NGX_AGAIN) {