Add port to Origin if the port is non default (80/443). (#262)
This commit is contained in:
parent
4ff98c359c
commit
367895f660
@ -147,6 +147,7 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
|
||||
originValue = originValue + ":" + wsPort;
|
||||
}
|
||||
|
||||
request.addHeader(Names.ORIGIN, originValue);
|
||||
request.addHeader(Names.SEC_WEBSOCKET_KEY1, key1);
|
||||
request.addHeader(Names.SEC_WEBSOCKET_KEY2, key2);
|
||||
if (getExpectedSubprotocol() != null && !getExpectedSubprotocol().equals("")) {
|
||||
|
@ -130,6 +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);
|
||||
|
||||
if (protocol != null && !protocol.equals("")) {
|
||||
request.addHeader(Names.SEC_WEBSOCKET_PROTOCOL, protocol);
|
||||
|
@ -130,6 +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);
|
||||
|
||||
if (protocol != null && !protocol.equals("")) {
|
||||
request.addHeader(Names.SEC_WEBSOCKET_PROTOCOL, protocol);
|
||||
|
Loading…
Reference in New Issue
Block a user