aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/http_client/httpc.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-10-12 11:37:32 +0200
committerMicael Karlberg <[email protected]>2011-10-12 11:37:32 +0200
commit45e501e1280839d91969e9d73449b9e474468e3e (patch)
tree8b410db4094d58a2e8b41423e3b6ce3c12eae146 /lib/inets/src/http_client/httpc.erl
parentd94c3259e06887bc0f333005f6955f5e75013b8e (diff)
downloadotp-45e501e1280839d91969e9d73449b9e474468e3e.tar.gz
otp-45e501e1280839d91969e9d73449b9e474468e3e.tar.bz2
otp-45e501e1280839d91969e9d73449b9e474468e3e.zip
Make return from the parse function conform with:
{error, Reason} | {ok, ParsedURL}
Diffstat (limited to 'lib/inets/src/http_client/httpc.erl')
-rw-r--r--lib/inets/src/http_client/httpc.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl
index 75c26c63cc..6e566589aa 100644
--- a/lib/inets/src/http_client/httpc.erl
+++ b/lib/inets/src/http_client/httpc.erl
@@ -157,7 +157,7 @@ request(Method, {Url, Headers}, HTTPOptions, Options, Profile)
case http_uri:parse(Url) of
{error, Reason} ->
{error, Reason};
- ParsedUrl ->
+ {ok, ParsedUrl} ->
handle_request(Method, Url, ParsedUrl, Headers, [], [],
HTTPOptions, Options, Profile)
end;
@@ -176,7 +176,7 @@ request(Method, {Url,Headers,ContentType,Body}, HTTPOptions, Options, Profile)
case http_uri:parse(Url) of
{error, Reason} ->
{error, Reason};
- ParsedUrl ->
+ {ok, ParsedUrl} ->
handle_request(Method, Url,
ParsedUrl, Headers, ContentType, Body,
HTTPOptions, Options, Profile)
@@ -267,7 +267,7 @@ store_cookies(SetCookieHeaders, Url, Profile)
{profile, Profile}]),
try
begin
- {_, _, Host, Port, Path, _} = http_uri:parse(Url),
+ {ok, {_, _, Host, Port, Path, _}} = http_uri:parse(Url),
Address = {Host, Port},
ProfileName = profile_name(Profile),
Cookies = httpc_cookie:cookies(SetCookieHeaders, Path, Host),