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

Bug 618 response handler in forwarder called twice per request #620

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

Conversation

hoetdr-post
Copy link
Collaborator

@hoetdr-post hoetdr-post commented Dec 18, 2024

On line 316, just after creating it, the cResHandler is added as a response handler to the cReq. No need to add it again when sending the request.
At first at removed it on line 316, since we add in while sending, but that doesn't work, because in some cases the pump starts writing the request before the send method is called and if the server already answers before the send is called, we would have no response handler installed.
This happens when forwarding to /server/return-with-status-code/503

…d the request. The reason is that the pump starts writing the upstream request before the #send() method is actually called, and if the server side already answers to that before we call #send(), we would have no handler installed yet.
@hoetdr-post hoetdr-post requested a review from mcweba December 18, 2024 13:14
@mcweba mcweba requested review from Kusig and hiddenalpha December 18, 2024 13:18
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