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

Preserve original response status on error after write, fix status message #4191

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

devinivy
Copy link
Member

@devinivy devinivy commented Nov 16, 2020

#4182 brings-up valid concerns about the status codes reported by server.inject() for response errors that occur after the original status code and headers have been written. In the past these original status codes have been completely overwritten. Now it should be accessible on server.inject()'s response.raw.res.statusCode, which may differ from response.statusCode when an error happened after the status code was written. This work additionally fixes response.statusMessage, which was out of sync with response.statusCode in these cases.

For some history on status codes reported by server.inject() see also outmoded/discuss#729 #3878 #3561

@devinivy devinivy merged commit d76ceb5 into master Nov 23, 2020
@devinivy devinivy deleted the fix-preserve-original-res-status branch November 23, 2020 01:47
@devinivy devinivy added this to the 20.0.3 milestone Nov 23, 2020
@devinivy devinivy self-assigned this Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants