Commit 0c80b0a6 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Normalize requests Accept-Encoding header if we are not pipe or pass

after vcl_recv{}.  This is necessary to get consistent Vary: header
processing.
parent f31ed40c
......@@ -1168,6 +1168,18 @@ cnt_recv(struct sess *sp)
return (0);
}
if (params->http_gzip_support &&
(recv_handling != VCL_RET_PIPE) &&
(recv_handling != VCL_RET_PASS)) {
if (RFC2616_Req_Gzip(sp)) {
http_Unset(sp->http, H_Accept_Encoding);
http_PrintfHeader(sp->wrk, sp->fd, sp->http,
"Accept-Encoding: gzip");
} else {
http_Unset(sp->http, H_Accept_Encoding);
}
}
SHA256_Init(sp->wrk->sha256ctx);
VCL_hash_method(sp);
assert(sp->handling == VCL_RET_HASH);
......
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