-
Notifications
You must be signed in to change notification settings - Fork 927
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Related: #1567 Motivation: `HttpHeaders` is mutable. It is currently very easy for everyone to update the request or response headers a lot later than expected, causing various hard-to-debug problems. Modifications: - Replaced the current `HttpHeaders` API and implementations with the new one. - `HttpHeaders` has some type hierarchy now. - `HttpHeaders` as a generic HTTP header container. - `HttpHeaders` does not have short methods like `path()`, `method()` and `status()`. `RequestHeaders` and `ResponseHeaders` have them. - `RequestHeaders` as a request-specific HTTP header container. - `ResponseHeaders` as a response-specific HTTP header container. - There are builders now: - `HttpHeadersBuilder` - `RequestHeadersBuilder` - `ResponseHeadersBuilder` - Changed the overall API related with specifying HTTP headers. - We now accept `CharSequence` instead of `AsciiString` as a header name, so that a user can specify a `String` as a header name. - We now accept `Iterable<? extends Map.Entry<...>>` instead of `Headers<...>` so that a user can specify wider range of types. - A header name is converted to an `AsciiString` internally. - Deprecated `HttpHeaders.EMPTY_HEADERS` in favor of `HttpHeaders.of()`. - Added `RequestContext.updateRequest()` so that a decorator author can update the request when filtering a request. Result: - We provide more secure API for representing HTTP headers.
- Loading branch information
Showing
263 changed files
with
8,175 additions
and
3,261 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
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
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.