Add port to Origin HTTP Header if the port is non default (80/443). See
#262
This commit is contained in:
parent
0a84ce6f00
commit
00e59da7ba
@ -146,6 +146,8 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
|
|||||||
// See http://tools.ietf.org/html/rfc6454#section-6.2
|
// See http://tools.ietf.org/html/rfc6454#section-6.2
|
||||||
originValue = originValue + ":" + wsPort;
|
originValue = originValue + ":" + wsPort;
|
||||||
}
|
}
|
||||||
|
request.addHeader(Names.ORIGIN, originValue);
|
||||||
|
|
||||||
|
|
||||||
request.addHeader(Names.SEC_WEBSOCKET_KEY1, key1);
|
request.addHeader(Names.SEC_WEBSOCKET_KEY1, key1);
|
||||||
request.addHeader(Names.SEC_WEBSOCKET_KEY2, key2);
|
request.addHeader(Names.SEC_WEBSOCKET_KEY2, key2);
|
||||||
|
@ -130,6 +130,8 @@ public class WebSocketClientHandshaker08 extends WebSocketClientHandshaker {
|
|||||||
// See http://tools.ietf.org/html/rfc6454#section-6.2
|
// See http://tools.ietf.org/html/rfc6454#section-6.2
|
||||||
originValue = originValue + ":" + wsPort;
|
originValue = originValue + ":" + wsPort;
|
||||||
}
|
}
|
||||||
|
request.addHeader(Names.ORIGIN, originValue);
|
||||||
|
|
||||||
|
|
||||||
if (protocol != null && !protocol.equals("")) {
|
if (protocol != null && !protocol.equals("")) {
|
||||||
request.addHeader(Names.SEC_WEBSOCKET_PROTOCOL, protocol);
|
request.addHeader(Names.SEC_WEBSOCKET_PROTOCOL, protocol);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user