aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorLars Thorsen <[email protected]>2016-04-05 10:08:34 +0200
committerLars Thorsen <[email protected]>2016-04-05 10:08:34 +0200
commit0526f1a5a545d2e6be0b5ef4f2588ed81447c416 (patch)
treef435d95e837174db2f87209c33b9cc43673a8e60 /lib/inets/test
parentad46aea945c946ea07d7369d9513d3e66442378f (diff)
parent0285ef94ab4d021c6bbfbe12ce6d3c1fa3c0cdda (diff)
downloadotp-0526f1a5a545d2e6be0b5ef4f2588ed81447c416.tar.gz
otp-0526f1a5a545d2e6be0b5ef4f2588ed81447c416.tar.bz2
otp-0526f1a5a545d2e6be0b5ef4f2588ed81447c416.zip
Merge branch 'FabioBatSilva/httpc-delete-body/PR-972/OTP-13383'
* FabioBatSilva/httpc-delete-body/PR-972/OTP-13383: inets: Add DELETE Body to client remove whitespaces
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/httpc_SUITE.erl24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 93b96e101f..f9b3aa5b59 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -67,6 +67,7 @@ real_requests()->
head,
get,
post,
+ delete,
post_stream,
patch,
async,
@@ -256,6 +257,29 @@ post(Config) when is_list(Config) ->
{ok, {{_,504,_}, [_ | _], []}} =
httpc:request(post, {URL, [{"expect","100-continue"}],
"text/plain", "foobar"}, [], []).
+%%--------------------------------------------------------------------
+delete() ->
+ [{"Test http delete request against local server. We do in this case "
+ "only care about the client side of the the delete. The server "
+ "script will not actually use the delete data."}].
+delete(Config) when is_list(Config) ->
+ CGI = case test_server:os_type() of
+ {win32, _} ->
+ "/cgi-bin/cgi_echo.exe";
+ _ ->
+ "/cgi-bin/cgi_echo"
+ end,
+
+ URL = url(group_name(Config), CGI, Config),
+ Body = lists:duplicate(100, "1"),
+
+ {ok, {{_,200,_}, [_ | _], [_ | _]}} =
+ httpc:request(delete, {URL, [{"expect","100-continue"}],
+ "text/plain", Body}, [], []),
+
+ {ok, {{_,504,_}, [_ | _], []}} =
+ httpc:request(delete, {URL, [{"expect","100-continue"}],
+ "text/plain", "foobar"}, [], []).
%%--------------------------------------------------------------------
patch() ->