mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Handle correctly p1_http:request result
This commit is contained in:
parent
2929f5b5bc
commit
b1723c6e2d
@ -272,9 +272,9 @@ geturl(Url, Hdrs, UsrOpts) ->
|
|||||||
_ -> []
|
_ -> []
|
||||||
end,
|
end,
|
||||||
case p1_http:request(get, Url, Hdrs, [], Host++User++UsrOpts++[{version, "HTTP/1.0"}]) of
|
case p1_http:request(get, Url, Hdrs, [], Host++User++UsrOpts++[{version, "HTTP/1.0"}]) of
|
||||||
{ok, {{_, 200, _}, Headers, Response}} ->
|
{ok, 200, Headers, Response} ->
|
||||||
{ok, Headers, Response};
|
{ok, Headers, Response};
|
||||||
{ok, {{_, Code, _}, _Headers, Response}} ->
|
{ok, Code, _Headers, Response} ->
|
||||||
{error, {Code, Response}};
|
{error, {Code, Response}};
|
||||||
{error, Reason} ->
|
{error, Reason} ->
|
||||||
{error, Reason}
|
{error, Reason}
|
||||||
|
Loading…
Reference in New Issue
Block a user