diff src/http/modules/ngx_http_index_module.c @ 955:ff762576da78

limit the ngx_http_index_module methods to GET, HEAD and POST
author Igor Sysoev <igor@sysoev.ru>
date Mon, 25 Dec 2006 12:37:04 +0000
parents a608349951cf
children c4f666fc3a7e
line wrap: on
line diff
--- a/src/http/modules/ngx_http_index_module.c
+++ b/src/http/modules/ngx_http_index_module.c
@@ -140,6 +140,10 @@ ngx_http_index_handler(ngx_http_request_
         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;