HTTP Client Upgrade Handler Compare Issue
Motivation: The HttpClientUpgradeHandler attempts to compare a supported codec against the input codec but the comparison logic is reversed. Modification: Negate the logic in HttpClientUpgradeHandler so an error is detected in the error condition. Result: HttpClientUpgradeHandler should not fail the upgrade when the input protocol is valid.
This commit is contained in:
parent
df7a1223f4
commit
95540bd49e
|
@ -182,7 +182,7 @@ public class HttpClientUpgradeHandler extends HttpObjectAggregator {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"Switching Protocols response missing UPGRADE header");
|
"Switching Protocols response missing UPGRADE header");
|
||||||
}
|
}
|
||||||
if (AsciiString.equalsIgnoreCase(upgradeCodec.protocol(), upgradeHeader)) {
|
if (!AsciiString.equalsIgnoreCase(upgradeCodec.protocol(), upgradeHeader)) {
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
"Switching Protocols response with unexpected UPGRADE protocol: "
|
"Switching Protocols response with unexpected UPGRADE protocol: "
|
||||||
+ upgradeHeader);
|
+ upgradeHeader);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user