Fix HttpHeaderValues.IDENTITY equals usage
Motivation: HttpHeaderValues.IDENTITY is an AsciiString, but was compared using equals to a String. Modifications: Use contentEquals instead. Result: Correct comparison.
This commit is contained in:
parent
72accceeac
commit
b5d90388ea
@ -101,7 +101,7 @@ public abstract class HttpContentDecoder extends MessageToMessageDecoder<HttpObj
|
||||
|
||||
// set new content encoding,
|
||||
CharSequence targetContentEncoding = getTargetContentEncoding(contentEncoding);
|
||||
if (HttpHeaderValues.IDENTITY.equals(targetContentEncoding)) {
|
||||
if (HttpHeaderValues.IDENTITY.contentEquals(targetContentEncoding)) {
|
||||
// Do NOT set the 'Content-Encoding' header if the target encoding is 'identity'
|
||||
// as per: http://tools.ietf.org/html/rfc2616#section-14.11
|
||||
headers.remove(HttpHeaderNames.CONTENT_ENCODING);
|
||||
|
Loading…
Reference in New Issue
Block a user