axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
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
       Body:
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".

Ok:

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

<pre>Caused by: java.io.IOException: '' For input string: ""
        at org.apache.axis.transport.http.ChunkedInputStream.getChunked(ChunkedInputStream.java:178)
        at org.apache.axis.transport.http.ChunkedInputStream.read(ChunkedInputStream.java:105)
        at java.io.FilterInputStream.read(FilterInputStream.java:111)
        at java.io.FilterInputStream.read(FilterInputStream.java:111)
        at java.io.PushbackInputStream.read(PushbackInputStream.java:161)
        at org.apache.crimson.parser.XmlReader.useEncodingDecl(XmlReader.java:353)
        at org.apache.crimson.parser.XmlReader.<init>(XmlReader.java:287)
        at org.apache.crimson.parser.XmlReader.createReader(XmlReader.java:125)
        at org.apache.crimson.parser.InputEntity.init(InputEntity.java:215)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:605)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
        ... 18 more</pre>

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

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

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:
  http://issues.apache.org/jira/browse/AXIS-1251?page=comments#action_36855

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1251

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
   Versions:
             current (nightly)

   Assignee: 
   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
SP4.

Description:
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


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message