mirror of
https://github.com/processone/ejabberd.git
synced 2024-10-31 15:21:38 +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,
|
||||
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, {{_, Code, _}, _Headers, Response}} ->
|
||||
{ok, Code, _Headers, Response} ->
|
||||
{error, {Code, Response}};
|
||||
{error, Reason} ->
|
||||
{error, Reason}
|
||||
|
Loading…
Reference in New Issue
Block a user