On removal all data that is still buffered in a handler it will be forwarded to the next handler in the pipeline. See ByteToMessageDecoder.handlerRemoved(...)

> Am 15.05.2014 um 21:42 schrieb Nathan Mittler <notifications@github.com>:
> 
> In codec-http/src/main/java/io/netty/handler/codec/http/HttpUpgradeClientHandler.java:
> 
> > +                    throw new Exception("Read HTTP response without requesting protocol switch");
> > +                }
> > +
> > +                HttpResponse response = (HttpResponse) msg;
> > +                if (response.getStatus() == SWITCHING_PROTOCOLS) {
> > +                    String upgradeHeader = response.headers().get(UPGRADE);
> > +                    if (upgradeHeader == null) {
> > +                        throw new Exception("Switching Protocols response missing UPGRADE header");
> > +                    }
> > +                    UpgradeCodec upgradeCodec = upgradeCodecMap.get(upgradeHeader.toUpperCase());
> > +                    if (upgradeCodec == null) {
> > +                        throw new Exception(
> > +                                "Switching Protocols response with unrecognized UPGRADE protocol: "
> > +                                        + upgradeHeader);
> > +                    }
> > +                    // TODO: What to do about additional data that might be buffered by the source decoder?
> My concern is that the previous decoder still has additional data buffered from the socket for the next frame. By removing the decoder from the pipeline, wouldn't we lose that data and therefore corrupt the response stream?
> 
> —
> Reply to this email directly or view it on GitHub.