Commit cac122f5 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-885: Set content length to prevent chunked encoding.

parent c7dd49bd
...@@ -457,8 +457,10 @@ public class HttpBindServlet extends HttpServlet { ...@@ -457,8 +457,10 @@ public class HttpBindServlet extends HttpServlet {
Log.trace("Data can be written to [" + remoteAddress + "]"); Log.trace("Data can be written to [" + remoteAddress + "]");
// BOSH communication should not have Chunked encoding. Ensure that the // BOSH communication should not have Chunked encoding. Ensure that the
// buffer can hold the entire response to prevent chunking. // buffer can hold the entire response to prevent chunking. Also explicitly
// set the content length for the same purpose.
context.getResponse().setBufferSize(data.length); context.getResponse().setBufferSize(data.length);
context.getResponse().setContentLength(data.length);
context.getResponse().getOutputStream().write(data); context.getResponse().getOutputStream().write(data);
context.complete(); context.complete();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment