diff options
author | Ingela Anderton Andin <[email protected]> | 2015-09-15 16:39:42 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2015-09-15 16:39:42 +0200 |
commit | e802c5d8152440cc59003f04271f7f1934453db4 (patch) | |
tree | b20ade33c7be23c4bc4c034c5ed122f491a9f74b /lib/inets/test/httpc_proxy_SUITE.erl | |
parent | 0d2bebf94d99b2d3bd39c5731ac81122f3ea7fb7 (diff) | |
parent | a66d9fb8813d32c7ded2253a7a5904f5b20b5ba8 (diff) | |
download | otp-e802c5d8152440cc59003f04271f7f1934453db4.tar.gz otp-e802c5d8152440cc59003f04271f7f1934453db4.tar.bz2 otp-e802c5d8152440cc59003f04271f7f1934453db4.zip |
Merge branch 'ia/pr/800/OTP-12984' into maint
* ia/pr/800/OTP-12984:
inets: Forward connection errors with https proxy
Diffstat (limited to 'lib/inets/test/httpc_proxy_SUITE.erl')
-rw-r--r-- | lib/inets/test/httpc_proxy_SUITE.erl | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/inets/test/httpc_proxy_SUITE.erl b/lib/inets/test/httpc_proxy_SUITE.erl index 786de1bc42..6d7af4ea5d 100644 --- a/lib/inets/test/httpc_proxy_SUITE.erl +++ b/lib/inets/test/httpc_proxy_SUITE.erl @@ -58,7 +58,7 @@ groups() -> [http_emulate_lower_versions |local_proxy_cases()]}, {local_proxy_https,[], - local_proxy_cases()}]. + local_proxy_cases() ++ local_proxy_https_cases()}]. %% internal functions @@ -77,6 +77,9 @@ local_proxy_cases() -> http_stream, http_not_modified_otp_6821]. +local_proxy_https_cases() -> + [https_connect_error]. + %%-------------------------------------------------------------------- init_per_suite(Config0) -> @@ -432,6 +435,21 @@ header_value(Name, [{HeaderName,HeaderValue}|Headers]) -> end. %%-------------------------------------------------------------------- +https_connect_error(doc) -> + ["Error from CONNECT tunnel should be returned"]; +https_connect_error(Config) when is_list(Config) -> + {HttpServer,HttpPort} = ?config(http, Config), + Method = get, + %% using HTTPS scheme with HTTP port to trigger connection error + URL = "https://" ++ HttpServer ++ ":" ++ + integer_to_list(HttpPort) ++ "/index.html", + Opts = [], + HttpOpts = [], + Request = {URL,[]}, + {error,{failed_connect,[_,{tls,_,_}]}} = + httpc:request(Method, Request, HttpOpts, Opts). + +%%-------------------------------------------------------------------- %% Internal Functions ------------------------------------------------ %%-------------------------------------------------------------------- |