You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ming fang <mi...@mac.com> on 2004/06/18 00:36:36 UTC
mod_jk is corrupting chunked responses
i've developed a servlet that streams data back to an applet using
transfer-encoding=chunked.
everything works fine when the applet connects directly to tomcat.
but when it connects via apache/jk2, the streams is corrupted.
the servlet sets the headers like this...
httpServletResponse.setHeader("Pragma", "no-cache");
httpServletResponse.setHeader("Cache-Control", "no-cache");
httpServletResponse.setDateHeader("Expires", -1);
httpServletResponse.setHeader("Content-Length", null);
httpServletResponse.setHeader("Connection", "close");
httpServletResponse.setHeader("Transfer-Encoding", "chunked");
the response outputstream is wrapped...
bufferedOutputStream = new
BufferedOutputStream(outputStream);
chunkedOutputStream = new ChunkedOutputStream(new
DataOutputStream(bufferedOutputStream));
dataOutputStream = new
DataOutputStream(chunkedOutputStream);
it seems the problem is that mod_jk is stripping the chunking headers,
which includes the size of the chunk followed by \r\n.
does anyone know a work around for this? please help.
-ming fang
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org