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

fix: respect when status code is set with res.status (GH-1429) #1440

Merged
merged 3 commits into from Aug 14, 2017

Conversation

svozza
Copy link
Contributor

@svozza svozza commented Aug 8, 2017

Pre-Submission Checklist

  • Opened an issue discussing these changes before opening the PR
  • Ran the linter and tests via make prepush
  • Included comprehensive and convincing tests for changes

Issues

Closes:

Changes

Before setting the default status code to 200 if there's been no error, it checks to see if res.status has been set and uses the value there if it has.

@kwhitley
Copy link

kwhitley commented Aug 9, 2017

@svozza - is this PR required for the apicache release?

Also, huge thanks for spearheading this - I've been swamped!

@kwhitley
Copy link

kwhitley commented Aug 9, 2017

Ahhh nm @svozza - have tested the fix myself, it works! 👍

Pretty please to the authors for a quick merge and npm patch for this... my users will be very grateful if I don't have to drop restify support to properly cover Node 7.7, 8+! :)

@kwhitley
Copy link

@svozza You see the out of date notice? Looks like a merge needed now...

@kwhitley
Copy link

@retrohacker, any idea on a merge & publish timeline on this? Apicache is waiting on a pretty big release that requires this fix!

🙏

@sean3z
Copy link
Member

sean3z commented Aug 14, 2017

Thanks for submitting this @svozza! 👍

I'm unsure whether this route was the original intent coming out of #1377
However, since it does solve the issue, this seems to be the best solution until a more long-term fix can be put in place.

I'm surprised this test wasn't in place before now! 😛

@sean3z sean3z merged commit 5abc067 into restify:5.x Aug 14, 2017
@svozza svozza deleted the respect-set-status-code branch August 15, 2017 12:43
@svozza
Copy link
Contributor Author

svozza commented Aug 15, 2017

Thank you, much appreciated! 😃

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.

None yet

3 participants