aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-07-01 12:00:53 +0200
committerPéter Dimitrov <[email protected]>2019-07-01 12:00:53 +0200
commit6839c250fe21b19b100b2ac156b0422c0ec0358d (patch)
treec0a317e744c2354dc9245736838745f1ef53143f /lib/inets/test
parent06309ff2294782558ad722e3c181550a6d27ebd1 (diff)
parent4c7bf834f532b682c92c77a4e4fe171002ee9d7a (diff)
downloadotp-6839c250fe21b19b100b2ac156b0422c0ec0358d.tar.gz
otp-6839c250fe21b19b100b2ac156b0422c0ec0358d.tar.bz2
otp-6839c250fe21b19b100b2ac156b0422c0ec0358d.zip
Merge branch 'peterdmv/inets/httpc-uri-scheme/ERL-969/OTP-15930' into maint
* peterdmv/inets/httpc-uri-scheme/ERL-969/OTP-15930: inets: Return error if URI has no scheme (httpc)
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/httpc_SUITE.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index d4b33ae2c6..1d37e71847 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -106,7 +106,8 @@ real_requests()->
streaming_error,
inet_opts,
invalid_headers,
- invalid_body
+ invalid_body,
+ no_scheme
].
real_requests_esi() ->
@@ -1231,6 +1232,16 @@ invalid_body(Config) ->
ok
end.
+
+%%-------------------------------------------------------------------------
+
+no_scheme(_Config) ->
+ {error,{bad_scheme,"ftp"}} = httpc:request("ftp://foobar"),
+ {error,{no_scheme}} = httpc:request("//foobar"),
+ {error,{no_scheme}} = httpc:request("foobar"),
+ ok.
+
+
%%-------------------------------------------------------------------------
remote_socket_close(Config) when is_list(Config) ->
URL = url(group_name(Config), "/just_close.html", Config),