aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpc_SUITE.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-12-21 10:54:16 +0100
committerIngela Anderton Andin <[email protected]>2016-12-21 10:54:16 +0100
commit691a6d0f68c5a2ef64315dd4d7759aa7aa8e2e99 (patch)
tree8c78ce19bffb2c9022a618b4dd6aaea8ae01a7bf /lib/inets/test/httpc_SUITE.erl
parent48ff78da8fdacf4fb1eecbaccfa65809cbbfa725 (diff)
parentcea3593337b0f57cd6e7a199eddc5be79f6d9b08 (diff)
downloadotp-691a6d0f68c5a2ef64315dd4d7759aa7aa8e2e99.tar.gz
otp-691a6d0f68c5a2ef64315dd4d7759aa7aa8e2e99.tar.bz2
otp-691a6d0f68c5a2ef64315dd4d7759aa7aa8e2e99.zip
Merge branch 'ingela/inets/httpc-user-hangs/ERL-271/OTP-14091' into maint
* ingela/inets/httpc-user-hangs/ERL-271/OTP-14091: inets: httpc - Prevent hanging user process inets: httpc - clean code
Diffstat (limited to 'lib/inets/test/httpc_SUITE.erl')
-rw-r--r--lib/inets/test/httpc_SUITE.erl18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 0d241833d5..8aea38037d 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -88,7 +88,8 @@ real_requests()->
stream_through_mfa,
streaming_error,
inet_opts,
- invalid_headers
+ invalid_headers,
+ invalid_body
].
only_simulated() ->
@@ -1002,10 +1003,25 @@ invalid_headers(Config) ->
Request = {url(group_name(Config), "/dummy.html", Config), [{"cookie", undefined}]},
{error, _} = httpc:request(get, Request, [], []).
+%%-------------------------------------------------------------------------
+
+invalid_body(Config) ->
+ URL = url(group_name(Config), "/dummy.html", Config),
+ try
+ httpc:request(post, {URL, [], <<"text/plain">>, "foobar"},
+ [], []),
+ ct:fail(accepted_invalid_input)
+ catch
+ error:function_clause ->
+ ok
+ end.
+
+%%-------------------------------------------------------------------------
remote_socket_close(Config) when is_list(Config) ->
URL = url(group_name(Config), "/just_close.html", Config),
{error, socket_closed_remotely} = httpc:request(URL).
+
%%-------------------------------------------------------------------------
remote_socket_close_async(Config) when is_list(Config) ->