strip trailing white-spaces in HTTP-request headers
before we parse them (fixes #1098) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1727 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
parent
54fa094d94
commit
76e55e958c
|
@ -744,6 +744,13 @@ int http_request_parse(server *srv, connection *con) {
|
|||
|
||||
s_len = cur - value;
|
||||
|
||||
/* strip trailing white-spaces */
|
||||
for (; s_len > 0 &&
|
||||
(value[s_len - 1] == ' ' ||
|
||||
value[s_len - 1] == '\t'); s_len--);
|
||||
|
||||
value[s_len] = '\0';
|
||||
|
||||
if (s_len > 0) {
|
||||
int cmp = 0;
|
||||
if (NULL == (ds = (data_string *)array_get_unused_element(con->request.headers, TYPE_STRING))) {
|
||||
|
|
Loading…
Reference in New Issue