aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-10-06 12:40:04 +0200
committerLoïc Hoguin <[email protected]>2011-10-06 12:40:04 +0200
commit8e835bce9fc28f5ddfd3a0818d5ec0e776182b27 (patch)
tree06374f6e1c47ea9f85b2ed76c88e63c3fad2827d /test/http_SUITE.erl
parent237b468f42c57d603c6dfcd99c98aaeacec6ba92 (diff)
downloadcowboy-8e835bce9fc28f5ddfd3a0818d5ec0e776182b27.tar.gz
cowboy-8e835bce9fc28f5ddfd3a0818d5ec0e776182b27.tar.bz2
cowboy-8e835bce9fc28f5ddfd3a0818d5ec0e776182b27.zip
Close the connection when the application sends Connection: close
Now Cowboy checks headers sent to the client for the 'Connection' header value, parses it, and checks whether it contains a 'close' or 'keep-alive' value. It makes sure to close or keep the connection alive depending on the value found there, if any. Also change chunked replies to not close the connection by default unless the application requests it.
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 8bfebaa..cb70ff3 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -117,7 +117,7 @@ headers_dupe(Config) ->
{ok, Data} = gen_tcp:recv(Socket, 0, 6000),
{_Start, _Length} = binary:match(Data, <<"Connection: close">>),
nomatch = binary:match(Data, <<"Connection: keep-alive">>),
- ok = gen_tcp:close(Socket).
+ {error, closed} = gen_tcp:recv(Socket, 0, 1000).
headers_huge(Config) ->
Cookie = lists:flatten(["whatever_man_biiiiiiiiiiiig_cookie_me_want_77="