private class ProxyToServerConnection.HeadAwareHttpResponseDecoder
extends io.netty.handler.codec.http.HttpResponseDecoder
Responses to HEAD requests aren't supposed to have content, but Netty doesn't know that any given response is to a HEAD request, so it needs to be told that there's no content so that it doesn't hang waiting for it.
See the documentation for HttpResponseDecoder
for information
about why HEAD requests need special handling.
Thanks to nataliakoval for pointing out that with connections being reused as they are, this needs to be sensitive to the current request.
Constructor and Description |
---|
HeadAwareHttpResponseDecoder(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isContentAlwaysEmpty(io.netty.handler.codec.http.HttpMessage httpMessage) |
createInvalidMessage, createMessage, isDecodingRequest
decode, decodeLast, reset, userEventTriggered
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
Copyright © 2009–2017 LittleShoot. All rights reserved.