Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2013-11-08 00:05:26 +0000
committerGreg Wilkins2013-11-08 00:05:26 +0000
commitb9a7e205433225a412bf32ad62f4c422093c47ba (patch)
treeb620a39044d09c97cd95666513826343da2b2e6d
parentedcb92244a0ceb3587547985394d39474ae080e2 (diff)
parent7b2e9db25e007992a3c4a78558d6e215a4baa778 (diff)
downloadorg.eclipse.jetty.project-b9a7e205433225a412bf32ad62f4c422093c47ba.tar.gz
org.eclipse.jetty.project-b9a7e205433225a412bf32ad62f4c422093c47ba.tar.xz
org.eclipse.jetty.project-b9a7e205433225a412bf32ad62f4c422093c47ba.zip
Merge branch 'jetty-8' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project into jetty-8
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java
index 6c3fa088eb..7ca81e5bed 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/GzipFilter.java
@@ -433,7 +433,30 @@ public class GzipFilter extends UserAgentFilter
@Override
protected DeflaterOutputStream createStream() throws IOException
{
- return new GZIPOutputStream(_response.getOutputStream(),_bufferSize);
+ return new GZIPOutputStream(_response.getOutputStream(),_bufferSize)
+ {
+ /**
+ * Work around a bug in the jvm GzipOutputStream whereby it is not
+ * thread safe when thread A calls finish, but thread B is writing
+ * @see java.util.zip.GZIPOutputStream#finish()
+ */
+ @Override
+ public synchronized void finish() throws IOException
+ {
+ super.finish();
+ }
+
+ /**
+ * Work around a bug in the jvm GzipOutputStream whereby it is not
+ * thread safe when thread A calls close(), but thread B is writing
+ * @see java.util.zip.GZIPOutputStream#close()
+ */
+ @Override
+ public synchronized void close() throws IOException
+ {
+ super.close();
+ }
+ };
}
};
}

Back to the top