[#1201] Correctly handle mix of not compressed and compressed requests
This commit is contained in:
parent
8057c699cd
commit
f76e38592d
@ -115,12 +115,19 @@ public abstract class HttpContentDecoder extends MessageToMessageDecoder<HttpObj
|
||||
return decoded;
|
||||
}
|
||||
|
||||
if (c instanceof LastHttpContent) {
|
||||
decodeStarted = false;
|
||||
}
|
||||
|
||||
return new Object[] { message, c.retain() };
|
||||
}
|
||||
|
||||
if (decoder != null) {
|
||||
return decodeContent(null, c);
|
||||
} else {
|
||||
if (c instanceof LastHttpContent) {
|
||||
decodeStarted = false;
|
||||
}
|
||||
return c.retain();
|
||||
}
|
||||
}
|
||||
@ -213,6 +220,7 @@ public abstract class HttpContentDecoder extends MessageToMessageDecoder<HttpObj
|
||||
if (decoder.finish()) {
|
||||
fetchDecoderOutput(out);
|
||||
}
|
||||
decodeStarted = false;
|
||||
decoder = null;
|
||||
}
|
||||
|
||||
|
@ -143,6 +143,7 @@ public abstract class HttpContentEncoder extends MessageToMessageCodec<HttpMessa
|
||||
|
||||
if (result == null) {
|
||||
if (c instanceof LastHttpContent) {
|
||||
encodeStarted = false;
|
||||
return new Object[] { message, new DefaultLastHttpContent(c.data().retain()) };
|
||||
} else {
|
||||
return new Object[] { message, new DefaultHttpContent(c.data().retain()) };
|
||||
@ -176,6 +177,10 @@ public abstract class HttpContentEncoder extends MessageToMessageCodec<HttpMessa
|
||||
return encodeContent(null, c);
|
||||
}
|
||||
|
||||
if (c instanceof LastHttpContent) {
|
||||
encodeStarted = false;
|
||||
}
|
||||
|
||||
return c.retain();
|
||||
}
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user