summaryrefslogtreecommitdiff
path: root/src/request.c
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2008-09-20 13:42:14 +0000
committerStefan Bühler <stbuehler@web.de>2008-09-20 13:42:14 +0000
commit3decb2647bebf9df9965c33c9e69eb7705dffe61 (patch)
treeac4ae59596420908610e63d74e71df7b11c649b5 /src/request.c
parent86766c10c584a000224ce0dd03f51fcb729a61e0 (diff)
downloadlighttpd-git-3decb2647bebf9df9965c33c9e69eb7705dffe61.tar.gz
Fix memleak in request header parsing (#1774, thx qhy)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2305 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/request.c')
-rw-r--r--src/request.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/request.c b/src/request.c
index 42988732..5a02aea8 100644
--- a/src/request.c
+++ b/src/request.c
@@ -825,6 +825,7 @@ int http_request_parse(server *srv, connection *con) {
"request-header:\n",
con->request.request);
}
+ array_insert_unique(con->request.headers, (data_unset *)ds);
return 0;
}
@@ -874,6 +875,7 @@ int http_request_parse(server *srv, connection *con) {
"request-header:\n",
con->request.request);
}
+ array_insert_unique(con->request.headers, (data_unset *)ds);
return 0;
}
} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("Expect")))) {
@@ -911,6 +913,7 @@ int http_request_parse(server *srv, connection *con) {
"request-header:\n",
con->request.request);
}
+ array_insert_unique(con->request.headers, (data_unset *)ds);
return 0;
}
} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("If-Modified-Since")))) {
@@ -936,6 +939,7 @@ int http_request_parse(server *srv, connection *con) {
"request-header:\n",
con->request.request);
}
+ array_insert_unique(con->request.headers, (data_unset *)ds);
return 0;
}
} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("If-None-Match")))) {
@@ -953,6 +957,7 @@ int http_request_parse(server *srv, connection *con) {
"request-header:\n",
con->request.request);
}
+ array_insert_unique(con->request.headers, (data_unset *)ds);
return 0;
}
} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("Range")))) {
@@ -976,6 +981,7 @@ int http_request_parse(server *srv, connection *con) {
"request-header:\n",
con->request.request);
}
+ array_insert_unique(con->request.headers, (data_unset *)ds);
return 0;
}
}