[jira] (JETTY-1509) The WebSocket Client should support customized headers

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1509) The WebSocket Client should support customized headers

JIRA jira@codehaus.org
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


Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1509) The WebSocket Client should support customized headers

JIRA jira@codehaus.org

     [ https://jira.codehaus.org/browse/JETTY-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Bartel reassigned JETTY-1509:
---------------------------------

    Assignee: Joakim Erdfelt

Can you take a look?
               

> 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
>            Assignee: Joakim Erdfelt
>
> 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


Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1509) The WebSocket Client should support customized headers

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

Attached is a patch that implements this behavior as of git head today.

Change By: Robert Roland (11/Jun/12 5:25 PM)
Attachment: 0001-JETTY-1509-The-WebSocket-Client-should-support-custo.patch
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1509) The WebSocket Client should support customized headers

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
 
Robert Roland edited a comment on Improvement JETTY-1509

Attached is a patch that implements this behavior as of git head today, for jetty 7.6.5-SNAPSHOT. I need this patch myself right now.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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
Reply | Threaded
Open this post in threaded view
|

[jira] (JETTY-1509) The WebSocket Client should support customized headers

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Jan Bartel commented on Improvement JETTY-1509

Robert -

I've moved this bug across to jetty eclipse bugzilla, as jetty moved across to Eclipse some time ago and we're trying to consolidate everything there:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=396561

Would you mind reading the Eclipse IP contribution guidelines (http://wiki.eclipse.org/Development_Resources/Handling_Git_Contributions) and if you're happy with them, then reattaching your patch to that issue?

thanks
Jan

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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