diff --git a/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHttpDecoder.java b/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHttpDecoder.java index 8718ce7a08..9ed2687c79 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHttpDecoder.java +++ b/codec-http/src/main/java/io/netty/handler/codec/spdy/SpdyHttpDecoder.java @@ -145,6 +145,7 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder { } String URL = spdySynStreamFrame.headers().get(PATH); + spdySynStreamFrame.headers().remove(PATH); // If a client receives a SYN_STREAM without a 'url' header // it must reply with a RST_STREAM with error code PROTOCOL_ERROR @@ -338,12 +339,10 @@ public class SpdyHttpDecoder extends MessageToMessageDecoder { // Remove the scheme header headers.remove(SCHEME); - if (spdyVersion >= 3) { - // Replace the SPDY host header with the HTTP host header - String host = headers.get(HOST); - headers.remove(HOST); - HttpHeaders.setHost(req, host); - } + // Replace the SPDY host header with the HTTP host header + String host = headers.get(HOST); + headers.remove(HOST); + req.headers().set(HttpHeaders.Names.HOST, host); for (Map.Entry e: requestFrame.headers()) { req.headers().add(e.getKey(), e.getValue());