[squid-users] why-squid-reuse-headers-from-parent-but-not-the-html-body-when-not-200-ok
Alex Rousskov
rousskov at measurement-factory.com
Fri Feb 3 18:15:34 UTC 2023
On 2/3/23 10:08, Tom JABBER wrote:
> As said in subject, if parent proxy returns a non 200 OK code along with
> some HTML body, "child" proxy reuses parent headers, which is already a
> matter of discussion, and among other headers, a content-length > 0
> while not forwarding the HTML received from parent.
>
> cf.
> https://superuser.com/questions/1765082/why-squid-reuse-headers-from-parent-but-not-the-html-body-when-not-200-ok
>
> Would there be anyone here willing to help ?
It is a known Squid bug. AFAIK, the bug does not have a simple
general-purpose fix, and there is probably relatively little demand for
fixing it because popular browsers pretty much ignore CONNECT response
headers (except for proxy authentication) and body (always?).
It is possible to modify Squid to stop promising to send the cache_peer
response body (at an HTTP framing level), but it is probably better (and
easier!) to modify Squid to just generate a short error response from
scratch (instead of forwarding cache_peer response headers without a
body). Doing so will probably break some use cases, so such a change may
be officially rejected, but, even if it is, it may still work/help in
some other specific use cases.
https://wiki.squid-cache.org/SquidFaq/AboutSquid#how-to-add-a-new-squid-feature-enhance-of-fix-something
HTH,
Alex.
More information about the squid-users
mailing list