]> granicus.if.org Git - ejabberd/commitdiff
Handle correctly p1_http:request result
authorBadlop <badlop@process-one.net>
Wed, 16 Nov 2016 12:11:23 +0000 (13:11 +0100)
committerBadlop <badlop@process-one.net>
Wed, 16 Nov 2016 12:11:23 +0000 (13:11 +0100)
src/ext_mod.erl

index 2f71343a242c05b8b6d99d537961522ed8102673..a2109e569abf6077ff12bfda05d063dc401b1abc 100644 (file)
@@ -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}