[#2006] Correctly handle HttpMessage / HttpContent implementations

This commit is contained in:
Norman Maurer 2013-11-26 10:57:24 +01:00
parent 98845cb392
commit 10e3651bf8

View File

@ -149,7 +149,12 @@ public abstract class HttpContentEncoder extends MessageToMessageCodec<HttpReque
} else {
out.add(res);
state = State.AWAIT_CONTENT;
break;
if (!(msg instanceof HttpContent)) {
// only break out the switch statement if we have not content to process
// See https://github.com/netty/netty/issues/2006
break;
}
// Fall through to encode the content
}
}
case AWAIT_CONTENT: {