Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#51 HttpUnit 1.6 does not support chunked responses

closed
Wolfgang Fahl
None
5
2008-01-14
2004-12-15
Anonymous
No

The server is sending a chunked gzip stream without
setting the Content-Length header. From what I can tell
the server is not required to send a Content-Length
when chunking, but will send the size as the first
entry in each subsequent response.

The symptom is that the EOF exception is thrown when
reading the stream.

I looked at the source and it doesn't appear to handle
this situation. A fix would be appreciated.

Regards,

Mike Faulkner
fmfaulkner@earthlink.net

Discussion

  • Logged In: NO

    I am also experiencing this problem. Is there any sort of
    workaround?

    I have provided a stack trace for you:

    7/21/05 9:36:35 AM (thread 0 run 0): Aborted run, script
    threw class java.io.EOFException: Unexpected end of ZLIB
    input stream
    java.io.EOFException: Unexpected end of ZLIB input stream
    at
    java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:215)
    at
    java.util.zip.InflaterInputStream.read(InflaterInputStream.java:134)
    at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:87)
    at
    com.meterware.httpunit.WebResponse.readFromStream(WebResponse.java:967)
    at
    com.meterware.httpunit.WebResponse.loadResponseText(WebResponse.java:927)
    at
    com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:61)
    at
    com.meterware.httpunit.HttpWebResponse.<init>(HttpWebResponse.java:67)
    at
    com.meterware.httpunit.WebConversation.newResponse(WebConversation.java:76)
    at
    com.meterware.httpunit.WebWindow.getResource(WebWindow.java:164)
    at
    com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128)
    at
    com.meterware.httpunit.FrameHolder.updateFrames(FrameHolder.java:185)
    at
    com.meterware.httpunit.WebWindow.updateFrameContents(WebWindow.java:252)
    at
    com.meterware.httpunit.WebClient.updateFrameContents(WebClient.java:485)
    at
    com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:146)
    at
    com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:130)
    at
    com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
    at
    com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
    at
    <hidden>.Tests.Stress.WorkforceWebConversation.getResponse(WorkforceWebConversation.java:36)
    at
    <hidden>.Tests.Stress.TimesheetClient.getTimeEntryFrameState(TimesheetClient.java:229)
    at
    <hidden>.Tests.Stress.TimesheetClient.getDefaultTimesheet(TimesheetClient.java:74)
    at
    <hidden>.Tests.Stress.WorkforceClient2.getDefaultTimesheet(WorkforceClient2.java:102)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
    <hidden>.Tests.Stress.ReconnectHandler.invoke(ReconnectHandler.java:44)
    at $Proxy0.getDefaultTimesheet(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
    org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
    at org.python.core.PyMethod.__call__(PyMethod.java)
    at org.python.core.PyObject.__call__(PyObject.java)
    at org.python.core.PyInstance.invoke(PyInstance.java)
    at
    net.grinder.engine.process.TestPyJavaInstance.access$001(TestPyJavaInstance.java:35)
    at
    net.grinder.engine.process.TestPyJavaInstance$1.call(TestPyJavaInstance.java:67)
    at
    net.grinder.engine.process.ThreadContextImplementation.invokeTest(ThreadContextImplementation.java:155)
    at
    net.grinder.engine.process.TestData.dispatch(TestData.java:79)
    at
    net.grinder.engine.process.TestPyJavaInstance.dispatch(TestPyJavaInstance.java:48)
    at
    net.grinder.engine.process.TestPyJavaInstance.invoke(TestPyJavaInstance.java:64)
    at
    org.python.pycode._pyx0.testTimesheet$7(grinder_test_functions.py:61)
    at
    org.python.pycode._pyx0.call_function(grinder_test_functions.py)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyFunction.__call__(PyFunction.java)
    at org.python.core.PyInstance.invoke(PyInstance.java)
    at
    org.python.pycode._pyx0.__call__$12(grinder_test_functions.py:111)
    at
    org.python.pycode._pyx0.call_function(grinder_test_functions.py)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyTableCode.call(PyTableCode.java)
    at org.python.core.PyFunction.__call__(PyFunction.java)
    at org.python.core.PyMethod.__call__(PyMethod.java)
    at org.python.core.PyObject.invoke(PyObject.java)
    at org.python.core.PyInstance.__call__(PyInstance.java)
    at org.python.core.PyObject.__call__(PyObject.java)
    at
    net.grinder.engine.process.JythonScript$JythonRunnable.run(JythonScript.java:143)
    at
    net.grinder.engine.process.GrinderThread.run(GrinderThread.java:128)
    at java.lang.Thread.run(Thread.java:534)

     
  • Lothsahn
    Lothsahn
    2005-07-21

    Logged In: YES
    user_id=506414

    This error seems to go away when you set the property:
    getClientProperties().setAcceptGzip(false);

    at startup. This is, of course, a workaround.

     
  • Wolfgang Fahl
    Wolfgang Fahl
    2007-12-30

    Logged In: YES
    user_id=1220573
    Originator: NO

    A simple JUnit testcase would help for a start.

     
  • Wolfgang Fahl
    Wolfgang Fahl
    2007-12-30

    Logged In: YES
    user_id=1220573
    Originator: NO

    Thank you for your Support Request for the httpunit project.
    httpunit is an open source project with very limited developer resources. The support of the project depends fully on it's community.

    Support Requests should therefore be directed to the httpunit mailing list. You can subscribe to that list via
    http://sourceforge.net/mail/?group_id=6550
    and be part of the community.

    If after some discussion you find that there is a bug in httpunit please try to prove so by checking out the latest trunk revision from svn. You might want to add a testcase in form of a JUnit Java source code that shows the problem and then suggest a modification with a patch. There are currently already around 700 JUnit Testcases so chances are you'll find a comparable testcase to start from.

    We'll happily add your modifications then to the svn repository.

    We are looking forward to your cooperation!

     
  • Wolfgang Fahl
    Wolfgang Fahl
    2007-12-30

    • assigned_to: nobody --> wolfgang_fahl
    • status: open --> pending
     
  • Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending --> closed