Re: [Simpleweb-Support] Chunked encoding changes
Brought to you by:
niallg
From: Niall G. <ni...@em...> - 2004-05-20 14:23:21
|
Hi, Thanks for this bug report. I think the reason this is happening is that I changed the MonitoredOutputStream to use the MonitoredOutputStream.flushBytes() method instead of the OutputStream.flush(). In fixing this bug I must have introduced a new one. Ill have to run a few tests to see where the problem is, but you can be sure that I will release an update (2.4.2) as soon as I find it. Thanks for the feedback! Niall ----- Original Message ----- From: "Marc Novakowski" Date: Mon, 17 May 2004 11:47:23 -0700 To: Subject: [Simpleweb-Support] Chunked encoding changes Ive 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. 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 CRLFs before the 0 indicating last chunk. For example, here is what the last two chunks looked like in 2.4 (which works fine): 12b ervices" use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="EnsService"> <wsdl:port binding="impl:ensSoapBinding" name="ens"> <wsdlsoap:address location="http://transport.url"/> </wsdl:port> </wsdl:service> </wsdl:definitions> 0 And this is what the same file looks like when using 2.4.1: 12b ervices" use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="EnsService"> <wsdl:port binding="impl:ensSoapBinding" name="ens"> <wsdlsoap:address location="http://transport.url"/> </wsdl:port> </wsdl:service> </wsdl:definitions> 0 In both cases the 0 has two CRLFs after it (which is correct according to the spec) however in the 2.4.1 case it has two extra CRLFs before the 0 (for a total of 3). I dont think this is correct, and Internet Explorer seems to agree (it keeps spinning the globe, as if its waiting for more bytes). 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 Im not sure where the 2.4.1 source code lives (other than in the released tar.gz file). Ive tried modifying ChunkedOutputStream.doClose() to remove the doControl() before writing the 0, but that only removed one of the CRLFs before the 0. Im not quite sure where the other one is being written. Any help you can provide would be appreciated! Thanks, Marc Novakowski -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |