aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorPablo Lamela <[email protected]>2015-12-08 17:45:55 +0000
committerPablo Lamela <[email protected]>2015-12-08 19:39:48 +0000
commitb20321973be4d8f7be2f766ac51d2a7b9d5d120f (patch)
tree6387b62758c150170067740f1fd5cea9ee78d40d /lib/inets/test
parenta16b7d63cc665dca90305b146c15de04487808db (diff)
downloadotp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.tar.gz
otp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.tar.bz2
otp-b20321973be4d8f7be2f766ac51d2a7b9d5d120f.zip
inets: Add PATCH method to client and server
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/httpc_SUITE.erl23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index c6c59ab1af..93b96e101f 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -68,6 +68,7 @@ real_requests()->
get,
post,
post_stream,
+ patch,
async,
pipeline,
persistent_connection,
@@ -257,6 +258,28 @@ post(Config) when is_list(Config) ->
"text/plain", "foobar"}, [], []).
%%--------------------------------------------------------------------
+patch() ->
+ [{"Test http patch request against local server. We do in this case "
+ "only care about the client side of the the patch. The server "
+ "script will not actually use the patch data."}].
+patch(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),
+
+ %% Cgi-script expects the body length to be 100
+ Body = lists:duplicate(100, "1"),
+
+ {ok, {{_,200,_}, [_ | _], [_ | _]}} =
+ httpc:request(patch, {URL, [{"expect","100-continue"}],
+ "text/plain", Body}, [], []).
+
+%%--------------------------------------------------------------------
post_stream() ->
[{"Test streaming http post request against local server. "
"We only care about the client side of the the post. "