Note, that this code does not know the content length before it starts writing the output to<br>the client, since it&#39;s being streamed.&nbsp; So it doesn&#39;t set the content length explicitly, like it used to.<br><br>My understanding of Tomcat&#39;s behavior is that if the content is small enough to fit in some tomcat output
<br>buffer size , it will buffer it and then send it all with a content length header. If it is larger than that<br>then Tomcat sends it in HTTP chunked encoding. I still have to verify this with a very large file. <br><br>
<br><div><span class="gmail_quote">On 10/28/07, <b class="gmail_sendername">Henry Minsky</b> &lt;<a href="mailto:henry.minsky@gmail.com">henry.minsky@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Change 20071028-hqm-6 by hqm@IBM-2E06404CB67 on 2007-10-28 20:42:12 EDT<br>&nbsp;&nbsp;&nbsp;&nbsp;in /cygdrive/c/users/hqm/openlaszlo/trunk<br>&nbsp;&nbsp;&nbsp;&nbsp;for <a href="http://svn.openlaszlo.org/openlaszlo/trunk">http://svn.openlaszlo.org/openlaszlo/trunk
</a><br><br>Summary: put XML parser back into server data proxy pipeline, to do<br>charset transcoding<br><br>New Features:<br><br>Bugs Fixed: LPP-4924<br><br>Technical Reviewer: max<br>QA Reviewer: pablo<br>Doc Reviewer:
<br><br>Details:<br><br>The server data proxy now uses the XMLPULL parser to parse<br>the data from the backend, in order to use Java to force a translation<br>into UTF-8<br>coding if needed.<br><br>This change also uses a worker Thread to read from the backend, while
<br>simultaneously<br>pipelining the data back throug the XML PULL parser to the client.<br>This should improve<br>response time and also removes a potential memory overflow and DOS<br>attack on the server.<br><br>Tests:<br>
<br>test/lfc/data/alldata.lzx<br>amazon<br>calendar<br><br><br>Files:<br>D&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WEB-INF/lib/xpp3-1.1.3.4d_b4.jar<br>A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WEB-INF/lib/xpp3-1.1.4c.jar<br>M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WEB-INF/lps/lfc/kernel/swf/LzLoadQueue.as<br>A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WEB-INF/lps/server/src/org/openlaszlo/data/HttpData.java
<br>M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WEB-INF/lps/server/src/org/openlaszlo/data/XMLGrabber.java<br>M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WEB-INF/lps/server/src/org/openlaszlo/data/HTTPDataSource.java<br>M&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WEB-INF/lps/server/src/org/openlaszlo/data/DataSource.java<br><br><br>
<br>--<br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">
hminsky@laszlosystems.com</a><br><br>