aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpc_SUITE.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2014-03-21 16:37:56 +0100
committerHenrik Nord <[email protected]>2014-03-21 16:37:59 +0100
commitae7a69f2840009d2313a52887bb2964347736954 (patch)
tree07615dc3c371c843f566bd6972f4bcd8e3934ee5 /lib/inets/test/httpc_SUITE.erl
parent9d46875b53ffb21bc55aec4a2c76472133ea5d1c (diff)
parent06c3cc2857b099fb4e08449b9518db808c9f4b2b (diff)
downloadotp-ae7a69f2840009d2313a52887bb2964347736954.tar.gz
otp-ae7a69f2840009d2313a52887bb2964347736954.tar.bz2
otp-ae7a69f2840009d2313a52887bb2964347736954.zip
Merge branch 'nox/httpc-transfer-encoding-identity'
* nox/httpc-transfer-encoding-identity: Support identity transfer-encoding in httpc OTP-11802
Diffstat (limited to 'lib/inets/test/httpc_SUITE.erl')
-rw-r--r--lib/inets/test/httpc_SUITE.erl14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index ba7e82a765..cfab64225f 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -104,6 +104,7 @@ only_simulated() ->
remote_socket_close,
remote_socket_close_async,
transfer_encoding,
+ transfer_encoding_identity,
redirect_loop,
redirect_moved_permanently,
redirect_multiple_choises,
@@ -630,6 +631,12 @@ transfer_encoding(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
+transfer_encoding_identity(Config) when is_list(Config) ->
+ URL = url(group_name(Config), "/identity_transfer_encoding.html", Config),
+ {ok, {{_,200,_}, [_|_], "IDENTITY"}} = httpc:request(URL).
+
+%%-------------------------------------------------------------------------
+
empty_response_header() ->
[{doc, "Test the case that the HTTP server does not send any headers. Solves OTP-6830"}].
empty_response_header(Config) when is_list(Config) ->
@@ -1615,6 +1622,13 @@ handle_uri(_,"/capital_transfer_encoding.html",_,_,Socket,_) ->
send(Socket, http_chunk:encode("obar</BODY></HTML>")),
http_chunk:encode_last();
+handle_uri(_,"/identity_transfer_encoding.html",_,_,_,_) ->
+ "HTTP/1.0 200 OK\r\n"
+ "Transfer-Encoding:identity\r\n"
+ "Content-Length:8\r\n"
+ "\r\n"
+ "IDENTITY";
+
handle_uri(_,"/cookie.html",_,_,_,_) ->
"HTTP/1.1 200 ok\r\n" ++
"set-cookie:" ++ "test_cookie=true; path=/;" ++