Class ProxyToServerConnection.HeadAwareHttpResponseDecoder

All Implemented Interfaces:
ChannelHandler, ChannelInboundHandler
Enclosing class:
ProxyToServerConnection

private class ProxyToServerConnection.HeadAwareHttpResponseDecoder extends 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 Details

    • HeadAwareHttpResponseDecoder

      public HeadAwareHttpResponseDecoder(int maxInitialLineLength, int maxHeaderSize, int maxChunkSize)
  • Method Details