diff options
author | Ingela Anderton Andin <[email protected]> | 2016-12-21 10:54:35 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-12-21 10:54:35 +0100 |
commit | 8e9ca427ec084e8a57c2f819741d6decfee15600 (patch) | |
tree | 5b916d5fa8240dce05181a37155b75636dddbf27 /lib/inets/test/httpc_SUITE.erl | |
parent | d95b534125dfdd27d711795a0a7dcf49dab4c2b9 (diff) | |
parent | 691a6d0f68c5a2ef64315dd4d7759aa7aa8e2e99 (diff) | |
download | otp-8e9ca427ec084e8a57c2f819741d6decfee15600.tar.gz otp-8e9ca427ec084e8a57c2f819741d6decfee15600.tar.bz2 otp-8e9ca427ec084e8a57c2f819741d6decfee15600.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/inets/test/httpc_SUITE.erl')
-rw-r--r-- | lib/inets/test/httpc_SUITE.erl | 18 |
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) -> |