[svn-commits] dlee: trunk r399080 - /trunk/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Sep 13 09:34:46 CDT 2013


Author: dlee
Date: Fri Sep 13 09:34:43 2013
New Revision: 399080

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399080
Log:
ARI: Fix WebSocket response when subprotocol isn't specified

When I moved the ARI WebSocket from /ws to /ari/events, I added code to
allow a WebSocket to connect without specifying the subprotocol if
there's only one subprotocol handler registered for the WebSocket.

Naively, I coded it to always respond with the subprotocol in use.
Unfortunately, according to RFC 6455, if the server's response includes
a subprotocol header field that "indicates the use of a subprotocol that
was not present in the client's handshake [...], the client MUST _Fail
the WebSocket Connection_.", emphasis theirs.

This patch correctly omits the Sec-WebSocket-Protocol if one is not
specified by the client.

(closes issue ASTERISK-22441)
Review: https://reviewboard.asterisk.org/r/2828/
........

Merged revisions 399039 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Fri Sep 13 09:34:43 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-398927,398938,398991,399017,399019,399021,399031,399064
+/branches/12:1-398558,398560-398577,398579-398927,398938,398991,399017,399019,399021,399031,399039,399064




More information about the svn-commits mailing list