Commit c0e2accf authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

When headers are surplus to limits, only log the first 20 char.

parent 16d58afe
......@@ -522,7 +522,8 @@ http_dissect_hdrs(struct worker *w, struct http *hp, int fd, char *p,
if (q - p > htc->maxhdr) {
VSC_C_main->losthdr++;
WSL(w, SLT_LostHeader, fd, "%.*s", q - p, p);
WSL(w, SLT_LostHeader, fd, "%.*s",
q - p > 20 ? 20 : q - p, p);
return (413);
}
......@@ -547,7 +548,8 @@ http_dissect_hdrs(struct worker *w, struct http *hp, int fd, char *p,
hp->nhd++;
} else {
VSC_C_main->losthdr++;
WSL(w, SLT_LostHeader, fd, "%.*s", q - p, p);
WSL(w, SLT_LostHeader, fd, "%.*s",
q - p > 20 ? 20 : q - p, p);
return (413);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment