aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-05-04 12:05:57 +0200
committerLoïc Hoguin <[email protected]>2011-05-04 12:52:13 +0200
commit6c1f73c53c9260d99f71676b400a27f0a853f584 (patch)
tree5d3ca05904b9f65647a24e8d17e6856583fb8fbc /test/http_SUITE.erl
parentcc663df5db916b4f4da532d765fc2d6b5b60933c (diff)
downloadcowboy-6c1f73c53c9260d99f71676b400a27f0a853f584.tar.gz
cowboy-6c1f73c53c9260d99f71676b400a27f0a853f584.tar.bz2
cowboy-6c1f73c53c9260d99f71676b400a27f0a853f584.zip
Add cowboy_http_req:port/1.
Returns the port given in the Host header if present, otherwise the default port of 443 for HTTPS and 80 for HTTP is returned.
Diffstat (limited to 'test/http_SUITE.erl')
-rw-r--r--test/http_SUITE.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index 6807f78..21681be 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -199,7 +199,7 @@ websocket(Config) ->
[Headers, Body] = websocket_headers(erlang:decode_packet(httph, Rest, []), []),
{'Connection', "Upgrade"} = lists:keyfind('Connection', 1, Headers),
{'Upgrade', "WebSocket"} = lists:keyfind('Upgrade', 1, Headers),
- {"sec-websocket-location", "ws://localhost/websocket"}
+ {"sec-websocket-location", "ws://localhost:80/websocket"}
= lists:keyfind("sec-websocket-location", 1, Headers),
{"sec-websocket-origin", "http://localhost"}
= lists:keyfind("sec-websocket-origin", 1, Headers),