axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Commented: (AXIS-1251) Transfer-Encoding not prperly detected on a response stream
Date Fri, 23 Jul 2004 19:46:17 GMT
The following comment has been added to this issue:

     Author: Aaron Hamid
    Created: Fri, 23 Jul 2004 12:45 PM
I am very confused guys :(

Here is what is happening for me.  I am writing a tunneling HTTP forwarder.  An Axis webservice
returns a response with Transfer-Encoding "chunked".


1) If I return "chunked" as the encoding, it is (apparently) detected, but I get an error
parsing it somehow:

<pre>Caused by: '' For input string: ""
        at org.apache.axis.transport.http.ChunkedInputStream.getChunked(
        at org.apache.crimson.parser.XmlReader.useEncodingDecl(
        at org.apache.crimson.parser.XmlReader.<init>(
        at org.apache.crimson.parser.XmlReader.createReader(
        at org.apache.crimson.parser.InputEntity.init(
        at org.apache.crimson.parser.Parser2.parseInternal(
        at org.apache.crimson.parser.Parser2.parse(
        at org.apache.crimson.parser.XMLReaderImpl.parse(
        at javax.xml.parsers.SAXParser.parse(
        at org.apache.axis.encoding.DeserializationContextImpl.parse(
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(
        ... 18 more</pre>

As you can see this IS coming from ChunkedInputStream.  The code throwing the error is in

<pre>try {
            chunkSize = Long.parseLong(sbuf, 16);
        } catch (NumberFormatException ne) {
            closed = true;
            throw new IOException("'" + sbuf + "' " + ne.getMessage());

A NumberFormatException is throw with this error, when the input string is empty ("").  So
for some reason it is having problems reading this value.  I am writing it (it is 1de in my
case) immediately before I write my message as per the chunked spec.  I am writing it to the
Writer of a ServletResponse.

2) If I instead send "Chunked" (capitalized) as the transfer encoding, then I get the "No
Document Root" described in this issue.  But when I check the CVS repository for ChunkedInputStream
for the axis1_1 tag, I do see that the patch above has been applied! (I am using axis 1.1)
- despite the fact that it was last modified 15 months ago, and this issue was posted just
this March!  I tested with Axis 1.1 and the 1.2 release off the web site. I don't understand.

3) If I remove the Transfer-Encoding header in the response, but instead set Content-Length,
and send it as normal this works as a workaround.

View this comment:

View the issue:

Here is an overview of the issue:
        Key: AXIS-1251
    Summary: Transfer-Encoding not prperly detected on a response stream
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: Axis
             current (nightly)

   Reporter: Danno Ferrin

    Created: Thu, 11 Mar 2004 2:07 PM
    Updated: Fri, 23 Jul 2004 12:45 PM
Environment: Client and server are Windows XP SP1, J2SE 1.4.2_04.  Server is Weblogic 6.1

When using HTTP 1.1 transport and the server response with a chunked response I get some involved
response about a lack of rocument element.  The chunking markers are note being processed
and being included in the HTTP response.

This is because the header is palced in the cache as lower case but the key to fetch it is
mixed case.

Patch is attached

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message