aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Gravell <[email protected]>2011-06-27 13:02:07 +0100
committerSteven Gravell <[email protected]>2011-06-27 15:25:30 +0100
commitbebe3dc5d2012877cdaf349012517eed40a93112 (patch)
tree31030dbaeb3ec0e835404ad95a9a8f1e770cead4 /test
parentf03dbf4d0662a231454f7c188c10e2892c2733ce (diff)
downloadcowboy-bebe3dc5d2012877cdaf349012517eed40a93112.tar.gz
cowboy-bebe3dc5d2012877cdaf349012517eed40a93112.tar.bz2
cowboy-bebe3dc5d2012877cdaf349012517eed40a93112.zip
do not send ports 80 and 443 - browsers get mad
Browsers get mad that the returned location address is not the same as what they sent, since the :(80|443) is stripped. Add a simple eunit test due to existing ct websockets tests not covering this case.
Diffstat (limited to 'test')
-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 b5b615d..409914d 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -212,7 +212,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:80/websocket"}
+ {"sec-websocket-location", "ws://localhost/websocket"}
= lists:keyfind("sec-websocket-location", 1, Headers),
{"sec-websocket-origin", "http://localhost"}
= lists:keyfind("sec-websocket-origin", 1, Headers),