Browse Source

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
svn/tags/lighttpd-1.4.20
Stefan Bühler 14 years ago
parent
commit
0c16fddde3
  1. 1
      NEWS
  2. 10
      src/mod_dirlisting.c

1
NEWS

@ -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

10
src/mod_dirlisting.c

@ -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;

Loading…
Cancel
Save