Commit 002a27a6 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland Committed by Reza Naghibi

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

Conflicts:
    bin/varnishd/http2/cache_http2_deliver.c
parent b501bb06
......@@ -238,7 +238,7 @@ h2_build_headers(struct vsb *resp, struct req *req)
AN(VSB_new(resp, req->ws->f, l, VSB_FIXEDLEN));
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