diff options
author | Péter Dimitrov <[email protected]> | 2018-10-08 15:07:01 +0200 |
---|---|---|
committer | Péter Dimitrov <[email protected]> | 2018-10-08 15:07:01 +0200 |
commit | 21e5a830ddcdb6efe62d46f491d7aa07e0184c89 (patch) | |
tree | 01a3b3a8a2f918b9d54a3322d149357124ac47a9 /lib/inets/test | |
parent | 89aa002c83e490ea59606a472f190e75ed1af5a2 (diff) | |
parent | d95cfc3b4a8ea1bbd8ad6c90f1e00b0150a87d7e (diff) | |
download | otp-21e5a830ddcdb6efe62d46f491d7aa07e0184c89.tar.gz otp-21e5a830ddcdb6efe62d46f491d7aa07e0184c89.tar.bz2 otp-21e5a830ddcdb6efe62d46f491d7aa07e0184c89.zip |
Merge branch 'peterdmv/inets/httpc-content-type/ERL-736/OTP-15339' into maint
* peterdmv/inets/httpc-content-type/ERL-736/OTP-15339:
inets: Fix handling of 'Content-Type' (httpc)
Change-Id: I8c9f48d8474dba7a83e4ecba6b8146faffb559fc
Diffstat (limited to 'lib/inets/test')
-rw-r--r-- | lib/inets/test/httpc_SUITE.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index 41f8b60363..8357e02014 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -156,6 +156,7 @@ only_simulated() -> multipart_chunks, get_space, delete_no_body, + post_with_content_type, stream_fun_server_close ]. @@ -1601,6 +1602,15 @@ delete_no_body(Config) when is_list(Config) -> httpc:request(delete, {URL, [], "text/plain", "TEST"}, [], []). %%-------------------------------------------------------------------- +post_with_content_type(doc) -> + ["Test that a POST request with explicit 'Content-Type' does not drop the 'Content-Type' header - Solves ERL-736"]; +post_with_content_type(Config) when is_list(Config) -> + URL = url(group_name(Config), "/delete_no_body.html", Config), + %% Simulated server replies 500 if 'Content-Type' header is present + {ok, {{_,500,_}, _, _}} = + httpc:request(post, {URL, [], "application/x-www-form-urlencoded", ""}, [], []). + +%%-------------------------------------------------------------------- request_options() -> [{doc, "Test http get request with socket options against local server (IPv6)"}]. request_options(Config) when is_list(Config) -> |