aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirilll Zaborsky <[email protected]>2015-05-26 10:55:25 +0300
committerZandra Hird <[email protected]>2015-06-09 10:20:09 +0200
commitf50670cd0640088122a3c2b657645e82b03cd227 (patch)
tree52597f74ba07a186a29e0abfa6302c5db00938bf
parentbbd68fb2f45ec2089d6f1bbffd2601bf776aa267 (diff)
downloadotp-f50670cd0640088122a3c2b657645e82b03cd227.tar.gz
otp-f50670cd0640088122a3c2b657645e82b03cd227.tar.bz2
otp-f50670cd0640088122a3c2b657645e82b03cd227.zip
inets: set proxy address for requests from keep-alive queue
httpc_handler should set correct address of the connected host and not ignore proxy option of the profile while sending requests taken out of keep-alive queue
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index 9d832ef18b..a4971cec0f 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -1302,7 +1302,8 @@ handle_pipeline(#state{status = pipeline,
handle_keep_alive_queue(#state{status = keep_alive,
session = Session,
profile_name = ProfileName,
- options = #options{keep_alive_timeout = TimeOut}} = State,
+ options = #options{keep_alive_timeout = TimeOut,
+ proxy = Proxy}} = State,
Data) ->
?hcrd("handle keep_alive", [{profile, ProfileName},
@@ -1323,7 +1324,8 @@ handle_keep_alive_queue(#state{status = keep_alive,
State#state{keep_alive = KeepAlive}, Data);
false ->
?hcrv("next request", [{request, NextRequest}]),
- #request{address = Address} = NextRequest,
+ #request{address = Addr} = NextRequest,
+ Address = handle_proxy(Addr, Proxy),
case httpc_request:send(Address, Session, NextRequest) of
ok ->
receive_response(NextRequest,