Browse Source

[core] 200 for OPTIONS /non-existent/path HTTP/1.1 (fixes #2939)

200 for OPTIONS /non-existent/path HTTP/1.1 when a module,
such as mod_webdav, has set Allow response header

x-ref:
  "OPTIONS should return 2xx status for non-existent resources if Allow is set"
  https://redmine.lighttpd.net/issues/2939
personal/stbuehler/ci-build
Glenn Strauss 3 years ago
parent
commit
95aa2c178d
  1. 6
      src/response.c

6
src/response.c

@ -138,6 +138,12 @@ static handler_t http_response_physical_path_check(server *srv, connection *con)
case ENAMETOOLONG:
/* file name to be read was too long. return 404 */
case ENOENT:
if (con->request.http_method == HTTP_METHOD_OPTIONS
&& NULL != http_header_response_get(con, HTTP_HEADER_OTHER, CONST_STR_LEN("Allow"))) {
con->http_status = 200;
return HANDLER_FINISHED;
}
con->http_status = 404;
if (con->conf.log_request_handling) {

Loading…
Cancel
Save