diff options
author | Zandra Hird <[email protected]> | 2015-06-10 17:56:54 +0200 |
---|---|---|
committer | Zandra Hird <[email protected]> | 2015-06-10 17:58:38 +0200 |
commit | 831aab8a46f9f659bc422fbbef4971e9e68b201f (patch) | |
tree | 4318f347c500f20844057c83c78059d28f46c986 /lib | |
parent | fc73f98012ab8a1688f1bdc9063bfe9d63a675c9 (diff) | |
parent | f50670cd0640088122a3c2b657645e82b03cd227 (diff) | |
download | otp-831aab8a46f9f659bc422fbbef4971e9e68b201f.tar.gz otp-831aab8a46f9f659bc422fbbef4971e9e68b201f.tar.bz2 otp-831aab8a46f9f659bc422fbbef4971e9e68b201f.zip |
Merge branch 'scrapinghub/proxy_addr_for_keeped_alive_request'
* scrapinghub/proxy_addr_for_keeped_alive_request:
inets: set proxy address for requests from keep-alive queue
OTP-12822
Diffstat (limited to 'lib')
-rw-r--r-- | lib/inets/src/http_client/httpc_handler.erl | 6 |
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, |