diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipFilterContentLengthTest.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipFilterContentLengthTest.java index 0d0e5cf79e6..2a4c8eb456d 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipFilterContentLengthTest.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/GzipFilterContentLengthTest.java @@ -344,9 +344,10 @@ public class GzipFilterContentLengthTest * @see http://bugs.eclipse.org/450873 */ @Test - @Ignore public void testHttpOutputWrite() throws Exception { + if (gzipFilterClass == GzipFilter.class) + return; // Can't downcaste output stream when wrapper is used testWithGzip(TestServletBufferTypeLengthWrite.class); } } diff --git a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/TestServletBufferTypeLengthWrite.java b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/TestServletBufferTypeLengthWrite.java index 16a66ddce11..80f5f133667 100644 --- a/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/TestServletBufferTypeLengthWrite.java +++ b/jetty-servlets/src/test/java/org/eclipse/jetty/servlets/gzip/TestServletBufferTypeLengthWrite.java @@ -61,7 +61,7 @@ public class TestServletBufferTypeLengthWrite extends TestDirContentServlet response.setHeader("ETag","W/etag-"+fileName); response.setContentLength(dataBytes.length); - + ((HttpOutput)out).write(ByteBuffer.wrap(dataBytes).asReadOnlyBuffer()); } }