From 964c2ea2d6aeb8cdc28b48bb3abede0758b12e90 Mon Sep 17 00:00:00 2001 From: Ludovic Orban Date: Fri, 12 Jul 2024 11:12:15 +0200 Subject: [PATCH] revert invalid changes Signed-off-by: Ludovic Orban --- .../server/handler/gzip/GzipResponseAndCallback.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipResponseAndCallback.java b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipResponseAndCallback.java index 13ae5c70637..221dfbe78a8 100644 --- a/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipResponseAndCallback.java +++ b/jetty-core/jetty-server/src/main/java/org/eclipse/jetty/server/handler/gzip/GzipResponseAndCallback.java @@ -72,6 +72,7 @@ public class GzipResponseAndCallback extends Response.Wrapper implements Callbac private final int _bufferSize; private final boolean _syncFlush; private DeflaterPool.Entry _deflaterEntry; + private RetainableByteBuffer _buffer; private boolean _last; public GzipResponseAndCallback(GzipHandler handler, Request request, Response response, Callback callback) @@ -302,7 +303,6 @@ public class GzipResponseAndCallback extends Response.Wrapper implements Callbac { private final ByteBuffer _content; private final boolean _last; - private RetainableByteBuffer _buffer; public GzipBufferCB(boolean complete, Callback callback, ByteBuffer content) { @@ -321,13 +321,6 @@ public class GzipResponseAndCallback extends Response.Wrapper implements Callbac LOG.debug("GzipBufferCB(complete={}, callback={}, content={})", complete, callback, BufferUtil.toDetailString(content)); } - @Override - protected void onCompleteSuccess() - { - cleanup(); - super.onCompleteSuccess(); - } - @Override protected void onCompleteFailure(Throwable x) { @@ -349,6 +342,7 @@ public class GzipResponseAndCallback extends Response.Wrapper implements Callbac // then the trailer has been generated and written below. // We have finished compressing the entire content, so // cleanup and succeed. + cleanup(); return Action.SUCCEEDED; }