aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-07-01 11:31:38 +0200
committerFredrik Gustafsson <[email protected]>2013-07-01 11:31:38 +0200
commit4b279e0482e826c1e2177d3ca4ff4db7f05cd608 (patch)
treed041fef29c8470459fbc933e904a7bf2bc09979d /lib/inets
parent7afffe3cd1e5fa3f9a45f8f78b44639be35ffd4c (diff)
parentcc6e4b6ce7c2c82fb3039a9e6d46a2c90fd45cf2 (diff)
downloadotp-4b279e0482e826c1e2177d3ca4ff4db7f05cd608.tar.gz
otp-4b279e0482e826c1e2177d3ca4ff4db7f05cd608.tar.bz2
otp-4b279e0482e826c1e2177d3ca4ff4db7f05cd608.zip
Merge branch 'maint'
Diffstat (limited to 'lib/inets')
-rw-r--r--lib/inets/src/http_client/httpc.erl2
-rw-r--r--lib/inets/test/httpc_proxy_SUITE.erl17
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index 41bba7995e..4d7023a8e9 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -175,7 +175,7 @@ request(Method,
request(Method,
{Url, Headers, ContentType, Body},
HTTPOptions, Options, Profile)
- when ((Method =:= post) orelse (Method =:= put)) andalso
+ when ((Method =:= post) orelse (Method =:= put) orelse (Method =:= delete)) andalso
(is_atom(Profile) orelse is_pid(Profile)) ->
?hcrt("request", [{method, Method},
{url, Url},
diff --git a/lib/inets/test/httpc_proxy_SUITE.erl b/lib/inets/test/httpc_proxy_SUITE.erl
index 84db39e76b..ddd23d0c65 100644
--- a/lib/inets/test/httpc_proxy_SUITE.erl
+++ b/lib/inets/test/httpc_proxy_SUITE.erl
@@ -69,6 +69,7 @@ local_proxy_cases() ->
http_post,
http_put,
http_delete,
+ http_delete_body,
http_headers,
http_proxy_auth,
http_doesnotexist,
@@ -262,6 +263,22 @@ http_delete(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
+http_delete_body(doc) ->
+ ["Perform a DELETE request with a content body. The server will not allow it "
+ "but we only test sending the request."];
+http_delete_body(Config) when is_list(Config) ->
+ Method = delete,
+ URL = url("/delete.html", Config),
+ Content = "foo=bar",
+ Request = {URL,[],"application/x-www-form-urlencoded",Content},
+ HttpOpts = [],
+ Opts = [],
+ {ok,{{_,405,_},[_|_],[_|_]}} =
+ httpc:request(Method, Request, HttpOpts, Opts),
+ ok.
+
+%%--------------------------------------------------------------------
+
http_headers(doc) ->
["Use as many request headers as possible"];
http_headers(Config) when is_list(Config) ->