ouinet
ouinet copied to clipboard
Do not cache hop-by-hop HTTP response headers
As explained here, hop-by-hop response headers should not be cached, as they only refer to a single transport-level connection. Unfortunately, the list of preserved headers here includes Connection
and Transfer-Encoding
.
We should check, before removing Transfer-Encoding
from the list, that receiving (say) a text file with Transfer-Encoding: gzip
does not result in the body being stored with Gzip compression. Removing Connection
is probably safe.
I've done a little work in this regard here, but I did not think the Transfer-Encoding
part as thoroughly as you did, so I may have introduced some new bugs with it :-/
I saw the commit but I didn't pay attention to the presence of Transfer-Encoding
so yes, that may be a bug now. We may try to ameliorate the situation by sending a TE request header, though chunked encoding should always be available… I don't know to what extent (and how) Boost handles transfer encoding, we may need to do some tests.