From d9286a9a68e8b10dcf006a60ec84a0439e725fac Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Fri, 12 Feb 2010 15:55:58 +0000 Subject: OTP-8431: Fix error handling of httpc_manager and its starter process OTP-8431: jean-sebastien.pedron@dumbbell.fr --- lib/inets/src/http_client/httpc_handler.erl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/inets/src/http_client/httpc_handler.erl') 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} -> -- cgit v1.2.3