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

Merged

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.
Copy link
Member

@hiddenalpha hiddenalpha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After TelCo I think this change is very valid.

@mcweba mcweba merged commit dc6591d into develop Jan 6, 2025
4 checks passed
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.

3 participants