Handle only HEAD, GET and POST in mod_dirlisting (same as in staticfile) (#1687)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2253 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Stefan Bühler 2008-07-30 21:37:30 +00:00
parent 41868422f3
commit 0c16fddde3
2 changed files with 11 additions and 0 deletions

1
NEWS
View File

@ -37,6 +37,7 @@ NEWS
* fixed typo in mod_accesslog (#1699)
* replaced buffer_{append,copy}_string with the _len variant where possible (#1732) (thx crypt)
* case insensitive match for secdownload md5 token (#1710)
* Handle only HEAD, GET and POST in mod_dirlisting (same as in staticfile) (#1687)
- 1.4.19 - 2008-03-10

View File

@ -859,6 +859,16 @@ URIHANDLER_FUNC(mod_dirlisting_subrequest) {
UNUSED(srv);
/* we only handle GET, POST and HEAD */
switch(con->request.http_method) {
case HTTP_METHOD_GET:
case HTTP_METHOD_POST:
case HTTP_METHOD_HEAD:
break;
default:
return HANDLER_GO_ON;
}
if (con->physical.path->used == 0) return HANDLER_GO_ON;
if (con->uri.path->used == 0) return HANDLER_GO_ON;
if (con->uri.path->ptr[con->uri.path->used - 2] != '/') return HANDLER_GO_ON;