aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorZandra <[email protected]>2016-02-02 10:46:22 +0100
committerZandra <[email protected]>2016-02-02 10:46:22 +0100
commitbdfc7355e066db8812dec0c3aa70a0fae0e5d6ac (patch)
tree6f8890b4e828cc95a72205ccf2d25f761f54fffb /lib/inets/test
parent0f15f90ef5f482b0e860e41438151a5d9c4859e7 (diff)
parentb20321973be4d8f7be2f766ac51d2a7b9d5d120f (diff)
downloadotp-bdfc7355e066db8812dec0c3aa70a0fae0e5d6ac.tar.gz
otp-bdfc7355e066db8812dec0c3aa70a0fae0e5d6ac.tar.bz2
otp-bdfc7355e066db8812dec0c3aa70a0fae0e5d6ac.zip
Merge branch 'palas/maint' into maint
* palas/maint: inets: Add PATCH method to client and server OTP-13286
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. "