Cater for empty responses when performing http content compression

We need to take into account an empty response when performing content compression. Per rfc 2616, 4.3 Message Body:
> All 1xx (informational), 204 (no content), and 304 (not modified) responses MUST NOT include a message-body.

We explicitly check for these responses and set the state to PASS_THROUGH. EmptyLastHttpContent should reset the state machine back to AWAITING_HEADERS.

This fix an issue in chrome that resulted in the browser hanging due to unexpected responses. See #3070 for context.
thank you for the review. will submit an updated PR.

On Mon, Nov 10, 2014 at 5:32 PM, Scott Mitchell <notifications@github.com>
wrote:

> In
> codec-http/src/main/java/io/netty/handler/codec/http/HttpContentEncoder.java:
>
> > @@ -174,6 +186,15 @@ protected void encode(ChannelHandlerContext ctx, HttpObject msg, List<Object> ou
> >          }
> >      }
> >
> > +    private static boolean isPassthru(final HttpResponse res) {
>
> I'm not sure we need the final modifier here.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/netty/netty/pull/3121/files#r20088242>.
>