[jetty-dev] [jira] (JETTY-1509) The WebSocket Client should support customized headers
"Daniel Wu (JIRA)" <[email protected]>
| Newsgroups | gmane.comp.java.jetty.general |
|---|---|
| Message-ID | <1913692526.65389.1334301303206.JavaMail.j2ee-jira@codehaus01.managed.contegix.com> |
Daniel Wu created JETTY-1509:
--------------------------------
Summary: The WebSocket Client should support customized headers
Key: JETTY-1509
URL: https://jira.codehaus.org/browse/JETTY-1509
Project: Jetty
Issue Type: Improvement
Components: Client
Affects Versions: 8.1.2
Reporter: Daniel Wu
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()) {
request.append(entry.getKey()).append(":").append(entry.getValue()).append("\r\n");
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email