couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [27/50] mochiweb commit: updated refs/heads/upstream to b66b68d
Date Wed, 29 Jul 2015 15:54:56 GMT
fix ssl receive support for websocket


Project: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/commit/dd0d00d4
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/tree/dd0d00d4
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/diff/dd0d00d4

Branch: refs/heads/upstream
Commit: dd0d00d45c65f08b6ccc93832f0791fb0aee93c9
Parents: 0be75c2
Author: Bob Ippolito <bob@redivi.com>
Authored: Sun Jan 11 18:11:41 2015 +1300
Committer: Bob Ippolito <bob@redivi.com>
Committed: Sun Jan 11 18:11:41 2015 +1300

----------------------------------------------------------------------
 src/mochiweb_websocket.erl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-mochiweb/blob/dd0d00d4/src/mochiweb_websocket.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_websocket.erl b/src/mochiweb_websocket.erl
index b7a4a62..2768a3e 100644
--- a/src/mochiweb_websocket.erl
+++ b/src/mochiweb_websocket.erl
@@ -47,7 +47,7 @@ request(Socket, Body, State, WsVersion, ReplyChannel) ->
         {tcp_error, _, _} ->
             mochiweb_socket:close(Socket),
             exit(normal);
-        {tcp, _, WsFrames} ->
+        {Proto, _, WsFrames} when Proto =:= tcp orelse Proto =:= ssl ->
             case parse_frames(WsVersion, WsFrames, Socket) of
                 close ->
                     mochiweb_socket:close(Socket),
@@ -217,7 +217,7 @@ parse_hybi_frames(Socket, <<_Fin:1,
         {tcp_error, _, _} ->
             mochiweb_socket:close(Socket),
             exit(normal);
-        {tcp, _, Continuation} ->
+        {Proto, _, Continuation} when Proto =:= tcp orelse Proto =:= ssl ->
             parse_hybi_frames(Socket, <<PartFrame/binary, Continuation/binary>>,
                               Acc);
         _ ->


Mime
View raw message