Create an error response body outside render_error (issue #144)#232
Open
jimvm wants to merge 3 commits intowebmachine:masterfrom
Open
Create an error response body outside render_error (issue #144)#232jimvm wants to merge 3 commits intowebmachine:masterfrom
jimvm wants to merge 3 commits intowebmachine:masterfrom
Conversation
Member
|
I think the better solution would be to have |
Contributor
Author
|
I guess I did not understand that correctly. So the Content-Encoding header should be cleared because the Content-Length header can't be changed there. Even if encodings_provided is set, in case of a 404 Content-Encoding should be clear. |
It is not possible to correctly encode the response in render_error. So it is better to delete the Content-Encoding header here.
Member
|
@jimvm I was merely suggesting the most expedient solution, not a hard-and-fast one. Basically, regardless of what the response returns, the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In l7 the resource and encodings_provided? is available so encode_body can be used. In this case the standard error response would have to be created outside of render_error though.
This works for gzip but not for deflate...