aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2013-10-14 13:52:23 +0200
committerIngela Anderton Andin <[email protected]>2013-10-14 13:52:23 +0200
commitb95bfc6c641a568f6ed5dc4ff9e80a742505744d (patch)
treef4b89f901bc4ea350cc6557a341144d09b85bfd6 /lib/inets/src/http_client/httpc.erl
parentea8545dbeb69431da8fdbbde0db9e7847725e9db (diff)
parentdb460f90313bb7adea4ebd4cf0f3cca568ddf118 (diff)
downloadotp-b95bfc6c641a568f6ed5dc4ff9e80a742505744d.tar.gz
otp-b95bfc6c641a568f6ed5dc4ff9e80a742505744d.tar.bz2
otp-b95bfc6c641a568f6ed5dc4ff9e80a742505744d.zip
Merge remote-tracking branch 'upstream/maint'
Diffstat (limited to 'lib/inets/src/http_client/httpc.erl')
-rw-r--r--lib/inets/src/http_client/httpc.erl23
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index 4d7023a8e9..da9bbdd1ec 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -208,16 +208,8 @@ cancel_request(RequestId) ->
cancel_request(RequestId, Profile)
when is_atom(Profile) orelse is_pid(Profile) ->
?hcrt("cancel request", [{request_id, RequestId}, {profile, Profile}]),
- ok = httpc_manager:cancel_request(RequestId, profile_name(Profile)),
- receive
- %% If the request was already fulfilled throw away the
- %% answer as the request has been canceled.
- {http, {RequestId, _}} ->
- ok
- after 0 ->
- ok
- end.
-
+ httpc_manager:cancel_request(RequestId, profile_name(Profile)).
+
%%--------------------------------------------------------------------------
%% set_options(Options) -> ok | {error, Reason}
@@ -241,14 +233,7 @@ set_options(Options, Profile) when is_atom(Profile) orelse is_pid(Profile) ->
?hcrt("set options", [{options, Options}, {profile, Profile}]),
case validate_options(Options) of
{ok, Opts} ->
- try
- begin
- httpc_manager:set_options(Opts, profile_name(Profile))
- end
- catch
- exit:{noproc, _} ->
- {error, inets_not_started}
- end;
+ httpc_manager:set_options(Opts, profile_name(Profile));
{error, Reason} ->
{error, Reason}
end.
@@ -343,8 +328,6 @@ store_cookies(SetCookieHeaders, Url, Profile)
ok
end
catch
- exit:{noproc, _} ->
- {error, {not_started, Profile}};
error:{badmatch, Bad} ->
{error, {parse_failed, Bad}}
end.