[Simpleweb-Support] Chunked encoding changes
Brought to you by:
niallg
|
From: Marc N. <ma...@ke...> - 2004-05-17 18:47:36
|
I've noticed a bit of a difference between 2.4 and 2.4.1 in the
generation of chunked-encoded responses. I have a SOAP handler that
uses Axis to generate SOAP responses, WSDL, etc. which worked fine in
2.4. However when I upgraded to 2.4.1 I noticed that Internet Explorer
could not longer download the generated WSDL file that Axis writes to
the simpleweb Response output stream.
=20
Upon closer inspection of the data written to the client, it appears
that the last chunk in the response contains some extra CRLF characters.
Specifically, there are 2 extra CRLF's before the "0" indicating last
chunk.
=20
For example, here is what the last two chunks looked like in 2.4 (which
works fine):
=20
12b
ervices" use=3D"literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name=3D"EnsService">
<wsdl:port binding=3D"impl:ensSoapBinding" name=3D"ens">
<wsdlsoap:address location=3D"http://transport.url"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
0
=20
=20
And this is what the same file looks like when using 2.4.1:
=20
12b
ervices" use=3D"literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name=3D"EnsService">
<wsdl:port binding=3D"impl:ensSoapBinding" name=3D"ens">
<wsdlsoap:address location=3D"http://transport.url"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
=20
=20
0
=20
=20
In both cases the 0 has two CRLF's after it (which is correct according
to the spec) however in the 2.4.1 case it has two extra CRLF's before
the "0" (for a total of 3). I don't think this is correct, and Internet
Explorer seems to agree (it keeps "spinning" the globe, as if it's
waiting for more bytes).
=20
I tried going through the files in CVS to see where this might have been
broken, but it looks like everything in there is about 9 months old, so
I'm not sure where the "2.4.1" source code lives (other than in the
released tar.gz file).
=20
I've tried modifying ChunkedOutputStream.doClose() to remove the
"doControl()" before writing the "0", but that only removed one of the
CRLF's before the 0. I'm not quite sure where the other one is being
written.
=20
Any help you can provide would be appreciated!
=20
Thanks,
Marc Novakowski
|