aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpc_SUITE.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2015-10-27 12:55:25 +0100
committerHenrik Nord <[email protected]>2015-10-27 12:55:25 +0100
commit1d6f49bfc5222217579540bd13c47a02e61896a9 (patch)
tree235b7e58fdfe6e99886c6367a5a23d7495aca0ec /lib/inets/test/httpc_SUITE.erl
parent4b5853e7865d6a1baab39d7345b1b8d0280a4291 (diff)
parent7dc9eefa341fbfae0ebc55a88b96a375c611e3a4 (diff)
downloadotp-1d6f49bfc5222217579540bd13c47a02e61896a9.tar.gz
otp-1d6f49bfc5222217579540bd13c47a02e61896a9.tar.bz2
otp-1d6f49bfc5222217579540bd13c47a02e61896a9.zip
Merge branch 'maint'
Diffstat (limited to 'lib/inets/test/httpc_SUITE.erl')
-rw-r--r--lib/inets/test/httpc_SUITE.erl15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 5b40d08859..2ad00bdf76 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -105,6 +105,7 @@ only_simulated() ->
internal_server_error,
invalid_http,
headers_dummy,
+ headers_with_obs_fold,
empty_response_header,
remote_socket_close,
remote_socket_close_async,
@@ -893,6 +894,13 @@ headers_dummy(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
+headers_with_obs_fold(Config) when is_list(Config) ->
+ Request = {url(group_name(Config), "/obs_folded_headers.html", Config), []},
+ {ok, {{_,200,_}, Headers, [_|_]}} = httpc:request(get, Request, [], []),
+ "a b" = proplists:get_value("folded", Headers).
+
+%%-------------------------------------------------------------------------
+
invalid_headers(Config) ->
Request = {url(group_name(Config), "/dummy.html", Config), [{"cookie", undefined}]},
{error, _} = httpc:request(get, Request, [], []).
@@ -1713,6 +1721,13 @@ handle_uri(_,"/dummy_headers.html",_,_,Socket,_) ->
send(Socket, http_chunk:encode("obar</BODY></HTML>")),
http_chunk:encode_last();
+handle_uri(_,"/obs_folded_headers.html",_,_,_,_) ->
+ "HTTP/1.1 200 ok\r\n"
+ "Content-Length:5\r\n"
+ "Folded: a\r\n"
+ " b\r\n\r\n"
+ "Hello";
+
handle_uri(_,"/capital_transfer_encoding.html",_,_,Socket,_) ->
Head = "HTTP/1.1 200 ok\r\n" ++
"Transfer-Encoding:Chunked\r\n\r\n",