[#737] WebSocketClientHandshaker00 should set Content-Length header do workaround problem with proxy

This commit is contained in:
Norman Maurer 2012-11-14 10:12:42 +01:00
parent 7a7668b101
commit 1e8ed50482

View File

@ -187,6 +187,9 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
request.addHeader(e.getKey(), e.getValue());
}
}
// Set Content-Length to workaround some known defect.
// See also: http://www.ietf.org/mail-archive/web/hybi/current/msg02149.html
request.setHeader(Names.CONTENT_LENGTH, key3.length);
request.setContent(ChannelBuffers.copiedBuffer(key3));