From c966fbb1634c0c4b786fddd067358030cb04b561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Tue, 6 Nov 2012 14:00:04 +0100 Subject: [PATCH] disable static files offloading for methods other than GET and HEAD --- core/protocol.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/protocol.c b/core/protocol.c index c3298503..689062ac 100644 --- a/core/protocol.c +++ b/core/protocol.c @@ -1030,6 +1030,12 @@ next: // check for static files + // skip methods other than GET and HEAD + if (uwsgi_strncmp(wsgi_req->method, wsgi_req->method_len, "GET", 3) && + uwsgi_strncmp(wsgi_req->method, wsgi_req->method_len, "HEAD", 4)) { + return 0; + } + // skip extensions struct uwsgi_string_list *sse = uwsgi.static_skip_ext; while(sse) {