Commit ff8d29ae authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Apply the 3 least significant digit rule of status code on H/2

In VCL we allow status codes larger then 999, and do modulo 1000 when
sending it to the client. But the code to apply the modulo was missing in
H/2.

This issue was uncovered and reported by @Francois-v3.

Fixes first case of: #3301
parent 6251d83e
......@@ -232,7 +232,7 @@ h2_build_headers(struct vsb *resp, struct req *req)
uint8_t buf[6];
ssize_t sz, sz1;
l = h2_status(buf, req->resp->status);
l = h2_status(buf, req->resp->status % 1000);
VSB_bcat(resp, buf, l);
hp = req->resp;
......
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