Skip to content
Snippets Groups Projects
Commit 84c4814a authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Terminate header parsing loop on \n as well as \r

With the latest change, *val will be \n after the last item, so
this avoids an extra loop through the loops.
parent c35aa0bc
No related branches found
No related tags found
No related merge requests found
Pipeline #8189 passed
......@@ -573,7 +573,7 @@ find_end(const char *val, const char ** sep)
static bool
parse_cache_control(struct http_session *sess, const char *val)
{
while (*val && *val != '\r') {
while (*val && *val != '\r' && *val != '\n') {
val = skipws(val);
const char *sep;
const char *end = find_end(val, &sep);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment