Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2014-04-07 02:59:15 +0000
committerGreg Wilkins2014-04-07 02:59:15 +0000
commit6edb854c696565c8b268463169fbe2b438d5b33a (patch)
tree016a66b4ae0c67abf70068951dcd17afb0d947d5 /jetty-servlets
parentcf430665b5d978db0b22b03b9aeb72b5f8568b5f (diff)
parent64e11bc8e8d0dea9eca99a3914c0c01c1ecc0075 (diff)
downloadorg.eclipse.jetty.project-6edb854c696565c8b268463169fbe2b438d5b33a.tar.gz
org.eclipse.jetty.project-6edb854c696565c8b268463169fbe2b438d5b33a.tar.xz
org.eclipse.jetty.project-6edb854c696565c8b268463169fbe2b438d5b33a.zip
Merge remote-tracking branch 'origin/master' into jetty-9.2.x
Conflicts: aggregates/jetty-all/pom.xml examples/async-rest/async-rest-jar/pom.xml examples/async-rest/async-rest-webapp/pom.xml examples/async-rest/pom.xml examples/embedded/pom.xml examples/pom.xml jetty-annotations/pom.xml jetty-ant/pom.xml jetty-client/pom.xml jetty-continuation/pom.xml jetty-deploy/pom.xml jetty-distribution/pom.xml jetty-fcgi/fcgi-client/pom.xml jetty-fcgi/fcgi-server/pom.xml jetty-fcgi/pom.xml jetty-http-spi/pom.xml jetty-http/pom.xml jetty-io/pom.xml jetty-jaas/pom.xml jetty-jaspi/pom.xml jetty-jmx/pom.xml jetty-jndi/pom.xml jetty-jsp/pom.xml jetty-jspc-maven-plugin/pom.xml jetty-maven-plugin/pom.xml jetty-monitor/pom.xml jetty-nosql/pom.xml jetty-osgi/jetty-osgi-boot-jsp/pom.xml jetty-osgi/jetty-osgi-boot-warurl/pom.xml jetty-osgi/jetty-osgi-boot/pom.xml jetty-osgi/jetty-osgi-httpservice/pom.xml jetty-osgi/jetty-osgi-npn/pom.xml jetty-osgi/pom.xml jetty-osgi/test-jetty-osgi-context/pom.xml jetty-osgi/test-jetty-osgi-webapp/pom.xml jetty-osgi/test-jetty-osgi/pom.xml jetty-plus/pom.xml jetty-proxy/pom.xml jetty-rewrite/pom.xml jetty-runner/pom.xml jetty-security/pom.xml jetty-server/pom.xml jetty-servlet/pom.xml jetty-servlets/pom.xml jetty-spdy/pom.xml jetty-spdy/spdy-client/pom.xml jetty-spdy/spdy-core/pom.xml jetty-spdy/spdy-example-webapp/pom.xml jetty-spdy/spdy-http-client-transport/pom.xml jetty-spdy/spdy-http-common/pom.xml jetty-spdy/spdy-http-server/pom.xml jetty-spdy/spdy-npn-tests/pom.xml jetty-spdy/spdy-server/pom.xml jetty-spring/pom.xml jetty-start/pom.xml jetty-util-ajax/pom.xml jetty-util/pom.xml jetty-webapp/pom.xml jetty-websocket/javax-websocket-client-impl/pom.xml jetty-websocket/javax-websocket-server-impl/pom.xml jetty-websocket/pom.xml jetty-websocket/websocket-api/pom.xml jetty-websocket/websocket-client/pom.xml jetty-websocket/websocket-common/pom.xml jetty-websocket/websocket-server/pom.xml jetty-websocket/websocket-servlet/pom.xml jetty-xml/pom.xml pom.xml tests/pom.xml tests/test-continuation/pom.xml tests/test-integration/pom.xml tests/test-loginservice/pom.xml tests/test-sessions/pom.xml tests/test-sessions/test-hash-sessions/pom.xml tests/test-sessions/test-jdbc-sessions/pom.xml tests/test-sessions/test-sessions-common/pom.xml tests/test-webapps/pom.xml tests/test-webapps/test-jaas-webapp/pom.xml tests/test-webapps/test-jetty-webapp/pom.xml tests/test-webapps/test-jndi-webapp/pom.xml tests/test-webapps/test-mock-resources/pom.xml tests/test-webapps/test-proxy-webapp/pom.xml tests/test-webapps/test-servlet-spec/pom.xml tests/test-webapps/test-servlet-spec/test-container-initializer/pom.xml tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml tests/test-webapps/test-servlet-spec/test-web-fragment/pom.xml tests/test-webapps/test-webapp-rfc2616/pom.xml
Diffstat (limited to 'jetty-servlets')
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java26
1 files changed, 1 insertions, 25 deletions
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java
index 53931e4b4f..3151ab8e5a 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java
@@ -115,37 +115,13 @@ public class GzipHttpOutput extends HttpOutput
private void gzip(ByteBuffer content, boolean complete, final Callback callback)
{
- if (content.hasRemaining())
+ if (content.hasRemaining() || complete)
{
if (content.hasArray())
new GzipArrayCB(content,complete,callback).iterate();
else
new GzipBufferCB(content,complete,callback).iterate();
}
- else if (complete)
- {
- _deflater.finish();
-
- int produced=_deflater.deflate(_buffer.array(),_buffer.arrayOffset()+_buffer.limit(),_buffer.capacity()-_buffer.limit(),Deflater.NO_FLUSH);
- _buffer.limit(_buffer.limit()+produced);
- addTrailer();
- superWrite(_buffer,complete,new Callback()
- {
- @Override
- public void succeeded()
- {
- getHttpChannel().getByteBufferPool().release(_buffer);
- _buffer=null;
- callback.succeeded();
- }
-
- @Override
- public void failed(Throwable x)
- {
- callback.failed(x);
- }
- });
- }
}
protected void commit(ByteBuffer content, boolean complete, Callback callback)

Back to the top