Browse Source

Fix the fix #1324/[2086]: if no module handled a request, treat method OPTION as 200, all others as 403.

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2095 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.19
Stefan Bühler 15 years ago
parent
commit
40a41e3b66
  1. 10
      src/response.c

10
src/response.c

@ -648,8 +648,14 @@ handler_t http_response_prepare(server *srv, connection *con) {
/* if we are still here, no one wanted the file, status 403 is ok I think */
if (con->mode == DIRECT) {
con->http_status = 403;
if (con->mode == DIRECT && con->http_status == 0) {
switch (con->request.http_method) {
case HTTP_METHOD_OPTIONS:
con->http_status = 200;
break;
default:
con->http_status = 403;
}
return HANDLER_FINISHED;
}

Loading…
Cancel
Save