-
Notifications
You must be signed in to change notification settings - Fork 919
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: A user sometimes wants to generate an error response differently depending on a certain request header value. For example: - Include a certain request header value in an error response for easier troubleshooting; or - Provide a different level of detail for the requests that contain a certain header. Modifications: - Added an optional `RequestHeaders` parameter to `ServerErrorHandler` methods. - Modified `Http{1,2}RequestDecoder` so it constructs a `RequestHeaders` as early as possible, so that `ServerErrorHandler` is given with a non-null `RequestHeaders` in most cases. - Updated `CustomServerErrorHandlerTest` to demonstrate this feature. Result: - (new feature) A user can generate an error response differently depending on the request headers. - (breaking changes) The method signatures of `ServerErrorHandler` has been changed.
- Loading branch information
Showing
9 changed files
with
208 additions
and
127 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.