]> git.kaiwu.me - nginx.git/commitdiff
limit the ngx_http_index_module methods to GET, HEAD and POST
authorIgor Sysoev <igor@sysoev.ru>
Mon, 25 Dec 2006 12:37:04 +0000 (12:37 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 25 Dec 2006 12:37:04 +0000 (12:37 +0000)
src/http/modules/ngx_http_index_module.c

index 4df57f9ce44a3877db24ff557740f2533dfc9d28..0f49551ccb26b7e8590ad2e070130bc069fb6097 100644 (file)
@@ -140,6 +140,10 @@ ngx_http_index_handler(ngx_http_request_t *r)
         return NGX_DECLINED;
     }
 
+    if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD|NGX_HTTP_POST))) {
+        return NGX_DECLINED;
+    }
+
     /* TODO: Win32 */
     if (r->zero_in_uri) {
         return NGX_DECLINED;