aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2012-10-02 09:27:14 +0200
committerRaimo Niskanen <[email protected]>2012-10-02 09:27:14 +0200
commitab4dbd7a5efdd4e6e059b9287704c85c01f09fc9 (patch)
treefc5b32c16f4767a66d90e8c9bb86041d5ae59ae3 /lib/inets/src/http_client/httpc.erl
parentaf9a8a011fd06ae54187bae73192c52495090933 (diff)
parent016c1d33c5c4e53b28121ec4c1aaf267d508c1aa (diff)
downloadotp-ab4dbd7a5efdd4e6e059b9287704c85c01f09fc9.tar.gz
otp-ab4dbd7a5efdd4e6e059b9287704c85c01f09fc9.tar.bz2
otp-ab4dbd7a5efdd4e6e059b9287704c85c01f09fc9.zip
Merge branch 'raimo/inets/https-proxy/OTP-10256'
* raimo/inets/https-proxy/OTP-10256: inets httpc: Document that RFC 2817 is not supported inets: Dialyzer fixes inets httpc: TLS via proxy inets: Remove obsolete testcases that are now in the proxy suite inets: Add tests using external proxy running on localhost
Diffstat (limited to 'lib/inets/src/http_client/httpc.erl')
-rw-r--r--lib/inets/src/http_client/httpc.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index b6e7708353..ede649a5a9 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -917,6 +917,10 @@ validate_options([{proxy, Proxy} = Opt| Tail], Acc) ->
validate_proxy(Proxy),
validate_options(Tail, [Opt | Acc]);
+validate_options([{https_proxy, Proxy} = Opt| Tail], Acc) ->
+ validate_https_proxy(Proxy),
+ validate_options(Tail, [Opt | Acc]);
+
validate_options([{max_sessions, Value} = Opt| Tail], Acc) ->
validate_max_sessions(Value),
validate_options(Tail, [Opt | Acc]);
@@ -979,6 +983,14 @@ validate_proxy({{ProxyHost, ProxyPort}, NoProxy} = Proxy)
validate_proxy(BadProxy) ->
bad_option(proxy, BadProxy).
+validate_https_proxy({{ProxyHost, ProxyPort}, NoProxy} = Proxy)
+ when is_list(ProxyHost) andalso
+ is_integer(ProxyPort) andalso
+ is_list(NoProxy) ->
+ Proxy;
+validate_https_proxy(BadProxy) ->
+ bad_option(https_proxy, BadProxy).
+
validate_max_sessions(Value) when is_integer(Value) andalso (Value >= 0) ->
Value;
validate_max_sessions(BadValue) ->