aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc_handler.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-02-12 15:55:58 +0000
committerErlang/OTP <[email protected]>2010-02-13 07:29:10 +0100
commitd9286a9a68e8b10dcf006a60ec84a0439e725fac (patch)
treed49cd8f54778f192593be6943b1661b9d1772d7e /lib/inets/src/http_client/httpc_handler.erl
parentba3758531a0b6dc6797457279e1ce0f99d282d20 (diff)
downloadotp-d9286a9a68e8b10dcf006a60ec84a0439e725fac.tar.gz
otp-d9286a9a68e8b10dcf006a60ec84a0439e725fac.tar.bz2
otp-d9286a9a68e8b10dcf006a60ec84a0439e725fac.zip
OTP-8431: Fix error handling of httpc_manager and its starter process
Diffstat (limited to 'lib/inets/src/http_client/httpc_handler.erl')
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index fec74932a2..31585537d4 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -267,9 +267,14 @@ handle_call({connect_and_send, #request{address = Address0,
%%send_ssl_tunnel_request(Address, Request,
%% #state{options = Options,
%% status = ssl_tunnel});
- Reason = https_through_proxy_is_not_currently_supported,
- Error = {error, Reason},
- {stop, Error, Error, State};
+ Reason = {failed_connecting,
+ https_through_proxy_is_not_currently_supported},
+ %% Send a reply to the original caller
+ ErrorResponse = httpc_response:error(Request, Reason),
+ httpc_response:send(Request#request.from, ErrorResponse),
+ %% Reply to the manager
+ ErrorReply = {error, Reason},
+ {stop, normal, ErrorReply, State};
true ->
case connect_and_send_first_request(Address, Request, State) of
{ok, NewState} ->