Skip to content

Commit

Permalink
Disable protocol upgrades for the HTTP client by default.
Browse files Browse the repository at this point in the history
This avoids problems where a connection could be blocked by an intermediate proxy that disallows upgrades.
If wanted, it could be enabled on an individual case with a configuration API on the OTP HTTP client
  • Loading branch information
jtorin committed Oct 24, 2024
1 parent cee960f commit 2e0a034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ private static RequestConfig requestConfig(Duration timeout) {
.custom()
.setResponseTimeout(Timeout.of(timeout))
.setConnectionRequestTimeout(Timeout.of(timeout))
.setProtocolUpgradeEnabled(false)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ private static RequestConfig requestConfig(Duration timeout) {
.custom()
.setResponseTimeout(Timeout.of(timeout))
.setConnectionRequestTimeout(Timeout.of(timeout))
.setProtocolUpgradeEnabled(false)
.build();
}
}

0 comments on commit 2e0a034

Please sign in to comment.