Compression Filter Issues - EOFException
I'm having some issues with implementing a Compression Filter in my day-time project. It works fine via the browser (and in AppFuse/Roller), but not in one of my Webtests. I think this is because my response doesn't have anything in it, but who knows. From my log file:
CompressionFilter.doFilter(87) | Unzipped size: 0 CompressionFilter.doFilter(106) | Zipped size: 20
And then the lovely error message from my testcase:
[canoo] java.io.EOFException [canoo] at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:200) [canoo] at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:190) [canoo] at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:130) [canoo] at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) [canoo] at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68) [canoo] at com.meterware.httpunit.WebResponse.defineRawInputStream(WebResponse.java:617)
I'm thinking I need to close a stream or something, but since it works fine via the browser - I'm stumped! Any ideas are appreciated. I can post the testcase if necessary.
Update: Richard Hill on the Webtest mailing list hooked me up with the solution. It turned out to be a bug in the JDK, which causes issues in HttpUnit. Here's the solution I used to workaround it.
Posted by Paul Rivers on July 14, 2003 at 05:24 AM MDT #
Posted by Paul Rivers on July 14, 2003 at 05:24 AM MDT #