Commit 7b6a395c authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Throw 503 on exceeding max 65k Vary header constituent limit.

parent f5c42c6a
......@@ -122,7 +122,12 @@ VRY_Create(struct req *req, const struct http *hp, struct vsb **psb)
e--;
/* Encode two byte length and contents */
l = e - h;
assert(!(l & ~0xffff));
if (l > 0xffff - 1) {
VSLb(req->vsl, SLT_Error,
"Vary header maximum length exceeded");
error = 1;
break;
}
} else {
e = h;
l = 0xffff;
......
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