Skip to content

Commit 2f7cefb

Browse files
authored
remove encoding decision based on response header (#140)
1 parent 2286ad8 commit 2f7cefb

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

avaje-jex/src/main/java/io/avaje/jex/compression/CompressedOutputStream.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,6 @@ public CompressedOutputStream(
3232

3333
private void decideCompression(int length) throws IOException {
3434
if (!compressionDecided) {
35-
var encoding = ctx.responseHeader(Constants.CONTENT_ENCODING);
36-
if (encoding != null) {
37-
this.compressedStream =
38-
findMatchingCompressor(encoding)
39-
.orElseThrow(
40-
() ->
41-
new IllegalStateException(
42-
"No compressor found for Content-Encoding:" + encoding))
43-
.compress(originStream);
44-
}
45-
4635
boolean compressionAllowed =
4736
compressedStream == null && compression.allowsForCompression(ctx.contentType());
4837

0 commit comments

Comments
 (0)