diff --git a/servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/HeaderUtils.java b/servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/HeaderUtils.java index 2cad77bb06..ba3eabeefc 100644 --- a/servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/HeaderUtils.java +++ b/servicetalk-http-netty/src/main/java/io/servicetalk/http/netty/HeaderUtils.java @@ -113,9 +113,7 @@ static boolean canAddResponseTransferEncodingProtocol(final int statusCode, } private static boolean canAddContentLength(final HttpMetaData metadata) { - // TODO once this bug is addressed (https://github.com/apple/servicetalk/pull/1213) - // we should relax the check here, remove content-encoding clause - return !hasContentHeaders(metadata.headers()) && !hasContentEncoding(metadata.headers()) && + return !hasContentHeaders(metadata.headers()) && isSafeToAggregate(metadata) && !mayHaveTrailers(metadata); }