couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject [33/50] couch commit: updated refs/heads/COUCHDB-2734-header-date to f3e022c
Date Mon, 29 Jun 2015 21:46:39 GMT
clean up conditionals


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

Branch: refs/heads/COUCHDB-2734-header-date
Commit: ef24a5733ea31b642d6ce7fa48c61ebd8a585311
Parents: 5501126
Author: Bob Ippolito <bob@redivi.com>
Authored: Wed Dec 25 15:33:36 2013 -0800
Committer: Bob Ippolito <bob@redivi.com>
Committed: Wed Dec 25 15:33:36 2013 -0800

----------------------------------------------------------------------
 src/mochiweb_websocket.erl | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/ef24a573/src/mochiweb_websocket.erl
----------------------------------------------------------------------
diff --git a/src/mochiweb_websocket.erl b/src/mochiweb_websocket.erl
index 5224312..3b87629 100644
--- a/src/mochiweb_websocket.erl
+++ b/src/mochiweb_websocket.erl
@@ -104,16 +104,14 @@ make_handshake(Req) ->
     Sec1Key = Req:get_header_value("Sec-WebSocket-Key1"),
     Sec2Key = Req:get_header_value("Sec-WebSocket-Key2"),
     Origin = Req:get_header_value(origin),
-    if not (SecKey == undefined) ->
-          hybi_handshake(SecKey);
-
-        (not (Sec1Key == undefined)) and (not (Sec2Key == undefined)) ->
+    if SecKey =/= undefined ->
+            hybi_handshake(SecKey);
+       Sec1Key =/= undefined andalso Sec2Key =/= undefined ->
             Host = Req:get_header_value("Host"),
             Path = Req:get(path),
             Body = Req:recv(8),
             Scheme = scheme(Req),
             hixie_handshake(Scheme, Host, Path, Sec1Key, Sec2Key, Body, Origin);
-
        true ->
           error
     end.


Mime
View raw message