Browse Source

fixed 'return 414 on overlong request-headers'

- 501 was returned if a unknown Method was used 


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@927 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.11
Jan Kneschke 17 years ago
parent
commit
f27b8d0168
  1. 5
      src/connections.c

5
src/connections.c

@ -370,6 +370,7 @@ static int connection_handle_write_prepare(server *srv, connection *con) {
default:
switch(con->http_status) {
case 400: /* bad request */
case 414: /* overload request header */
case 505: /* unknown protocol */
case 207: /* this was webdav */
break;
@ -989,11 +990,11 @@ int connection_handle_read_state(server *srv, connection *con) {
if (h_term) {
connection_set_state(srv, con, CON_STATE_REQUEST_END);
} else if (con->request.request->used > 64 * 1024) {
log_error_write(srv, __FILE__, __LINE__, "sd", "http-header larger then 64k -> disconnected", chunkqueue_length(cq));
log_error_write(srv, __FILE__, __LINE__, "s", "oversized request-header -> sending Status 414");
con->http_status = 414; /* Request-URI too large */
con->keep_alive = 0;
connection_set_state(srv, con, CON_STATE_REQUEST_END);
connection_set_state(srv, con, CON_STATE_HANDLE_REQUEST);
}
break;
case CON_STATE_READ_POST:

Loading…
Cancel
Save