Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 8.1.2
-
Fix Version/s: None
-
Component/s: Client
-
Labels:None
-
Number of attachments :
Description
Add a method getHeaders() to WebSocketClient, just like getCookies(). Then the client has an opportunity to insert specific headers before making the connection. E.g. the header could contain the client specific authentication or identification information, so that the server side can identify which user is trying to connect.
The change need to modify handshake() method in org.eclipse.jetty.websocket.WebSocketClientFactory.HandshakeConnection a little bit.
Inesrt the following codes at line 428:
Map<String, String> headers = _future.getHeaders();
if (headers != null && !headers.isEmpty()) {
for (Map.Entry<String, String> entry : headers.entrySet())
}