-
Notifications
You must be signed in to change notification settings - Fork 926
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: The `RetryingClient` uses `ExchangeType` to decide whether to use `HttpRequestDuplicator`: https://github.com/line/armeria/blob/7474525b8cf25f02be6df7c38510a8fb6a88cb1f/core/src/main/java/com/linecorp/armeria/client/retry/RetryingClient.java#L245-L246 Thus, setting the proper `ExchangeType` is important. `ExchangeType` is currently inferred from the `HttpRequest` implementation: https://github.com/line/armeria/blob/7474525b8cf25f02be6df7c38510a8fb6a88cb1f/core/src/main/java/com/linecorp/armeria/internal/client/DefaultClientRequestContext.java#L285-L288 However, `DefaultWebClient` wraps the request, which results in incorrect `ExchangeType` detection: https://github.com/line/armeria/blob/7474525b8cf25f02be6df7c38510a8fb6a88cb1f/core/src/main/java/com/linecorp/armeria/client/DefaultWebClient.java#L113 Modifications: - Unwrapped `HeaderOverridingHttpRequest` to detect the correct `ExchangeType`. - Added `RequestOptions` when sending a request where applicable. Result: - The `ExchangeType` is now correctly detected for the default `WebClient`.
- Loading branch information
Showing
8 changed files
with
69 additions
and
13 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
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