Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
Motivation:

We used to have a double lookup for Connection header, based on case.
But HttpHeaders lookup is case insensitive and I forgot to remove this
code that now performs the lookup twice.

Modification:

Remove dead code

Result:

Dead code removed
  • Loading branch information
slandelle committed Feb 7, 2017
1 parent 916b8aa commit 7a70b80
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ public void call() throws Exception {
boolean validStatus = response.status().equals(SWITCHING_PROTOCOLS);
boolean validUpgrade = response.headers().get(UPGRADE) != null;
String connection = response.headers().get(CONNECTION);
if (connection == null)
connection = response.headers().get(CONNECTION);
boolean validConnection = HttpHeaderValues.UPGRADE.contentEqualsIgnoreCase(connection);
boolean statusReceived = handler.onStatusReceived(status) == State.CONTINUE;

Expand Down

0 comments on commit 7a70b80

Please sign in to comment.