Browse Source

fixed invalid chars in header values (fixes #1286)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1928 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.17
Jan Kneschke 15 years ago
parent
commit
8f8e23f636
  1. 11
      src/request.c

11
src/request.c

@ -1011,6 +1011,17 @@ int http_request_parse(server *srv, connection *con) {
/* strip leading WS */
if (value == cur) value = cur+1;
default:
if (*cur >= 0 && *cur < 32) {
if (srv->srvconf.log_request_header_on_error) {
log_error_write(srv, __FILE__, __LINE__, "sds",
"invalid char in header", (int)*cur, "-> 400");
}
con->http_status = 400;
con->keep_alive = 0;
return 0;
}
break;
}
}

Loading…
Cancel
Save