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

Bind request continuation methods to current domain #3448

Merged
merged 1 commit into from
May 29, 2017

Conversation

kanongil
Copy link
Contributor

@kanongil kanongil commented Mar 1, 2017

Fix for outmoded/discuss#445.

This ensures that any built-in request continuation methods are called using the correct domain. This is needed since promises lose the domain binding when eg. reply() is called inside a .then().

@kanongil
Copy link
Contributor Author

kanongil commented Mar 1, 2017

Note that this doesn't fix it completely for extended methods, like inert's reply.file(), though it still helps since it eventually calls reply.response().

@devinivy
Copy link
Member

devinivy commented Mar 2, 2017

Is there a specific reason the same fix for decorations is omitted (as you've mentioned)?

@kanongil
Copy link
Contributor Author

kanongil commented Mar 2, 2017

Mostly I only thought about it after I submitted the PR. Secondly, there is no way to know if the decoration is a continuation method, though we could just always bind the method to the domain to be safe.

Let me know if you want me to update the PR.

@hueniverse hueniverse self-assigned this May 29, 2017
@hueniverse hueniverse added the bug Bug or defect label May 29, 2017
@hueniverse hueniverse added this to the 16.1.2 milestone May 29, 2017
@hueniverse hueniverse merged commit c247476 into hapijs:master May 29, 2017
hueniverse added a commit that referenced this pull request May 29, 2017
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants