You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
The WebSocket interface specified by W3C and available in browsers doesn't allow to set request headers but in some cases request headers are used and can be configured. For example, subprotocol names are transmitted through Sec-WebSocket-Protocol header field. Also, this restriction is only valid in browser-based applications.
This feature allows to read WebSocket handshake request headers without unwrapping a ServerWebSocket instance to access underlying objects so that a developer should be able to retrieve headers such as Authorization and Sec-WebSocket-Protocol and use them to implement some protocol.
The following methods will be added in ServerWebSocket as handshake request header accessors:
Set<String> headerNames();
String header(String name);
List<String> headers(String name);
The text was updated successfully, but these errors were encountered:
The WebSocket interface specified by W3C and available in browsers doesn't allow to set request headers but in some cases request headers are used and can be configured. For example, subprotocol names are transmitted through
Sec-WebSocket-Protocol
header field. Also, this restriction is only valid in browser-based applications.This feature allows to read WebSocket handshake request headers without unwrapping a
ServerWebSocket
instance to access underlying objects so that a developer should be able to retrieve headers such asAuthorization
andSec-WebSocket-Protocol
and use them to implement some protocol.The following methods will be added in
ServerWebSocket
as handshake request header accessors:Set<String> headerNames();
String header(String name);
List<String> headers(String name);
The text was updated successfully, but these errors were encountered: