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

OF-908: Chunked encoding in BOSH should not occur.

parent 6e4a0edb
...@@ -459,9 +459,9 @@ public class HttpBindServlet extends HttpServlet { ...@@ -459,9 +459,9 @@ public class HttpBindServlet extends HttpServlet {
public void onWritePossible() throws IOException { public void onWritePossible() throws IOException {
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 use Chunked encoding.
// buffer can hold the entire response to prevent chunking. // This is prevented by explicitly setting the Content-Length header.
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