Use Sec-WebSocket-Origin instead of Origin (#264)

- Contributed by @normanmaurer
This commit is contained in:
Trustin Lee 2012-05-30 16:04:34 -07:00
parent 367895f660
commit c7004ed142
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ public class WebSocketClientHandshaker08 extends WebSocketClientHandshaker {
// See http://tools.ietf.org/html/rfc6454#section-6.2
originValue = originValue + ":" + wsPort;
}
request.addHeader(Names.ORIGIN, originValue);
request.addHeader(Names.SEC_WEBSOCKET_ORIGIN, originValue);
if (protocol != null && !protocol.equals("")) {
request.addHeader(Names.SEC_WEBSOCKET_PROTOCOL, protocol);

View File

@ -130,7 +130,7 @@ public class WebSocketClientHandshaker13 extends WebSocketClientHandshaker {
// See http://tools.ietf.org/html/rfc6454#section-6.2
originValue = originValue + ":" + wsPort;
}
request.addHeader(Names.ORIGIN, originValue);
request.addHeader(Names.SEC_WEBSOCKET_ORIGIN, originValue);
if (protocol != null && !protocol.equals("")) {
request.addHeader(Names.SEC_WEBSOCKET_PROTOCOL, protocol);