Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repair_http_framing hack for Squid v6 #248

Open
wants to merge 2 commits into
base: v6
Choose a base branch
from

Conversation

eduard-bagdasaryan
Copy link

@eduard-bagdasaryan eduard-bagdasaryan commented Mar 20, 2024

This repair_http_framing implementation also repairs HTTP header fields
with names containing non-token characters.

Also allow using just-parsed HTTP responses with ACLFilledChecklist, as
was done in recent master/v7 commit 80a6a08.

This version contains support for repairing HTTP header fields with
names containing non-token characters.

Also: Allow using just-parsed HTTP responses with ACLFilledChecklist.
The lack of HttpReply locking meant that we could not (safely) use the
freshly created reply object for ACLs checks because ACLFilledChecklist
destructor would unwittingly destroy the object (by unlocking it). There
was at least one such ACL check (in handle1xx()), but we got lucky
because that method also added the reply object to ALE, increasing its
reference counter.

TODO: That above addition to ALE should probably happen earlier and
unconditionally.

This change also protects from HttpReply memory leaks when an exception
is thrown between HttpReply creation and a setVirginReply() call.
Also adjusted a local static according to the 'no-globals' approach.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant