Commit 1adfedd0 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Retry old Java style only if method was not supported. Otherwise answer null.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3669 b35dd754-fafc-0310-a699-88a17e54d16e
parent b7b646f3
......@@ -131,7 +131,7 @@ public class FaviconServlet extends HttpServlet {
client.executeMethod(get);
return get.getResponseBody();
}
catch (Exception e) {
catch (IllegalStateException e) {
// Something failed (probably a method not supported) so try the old stye now
try {
URLConnection urlConnection = new URL(url).openConnection();
......@@ -158,6 +158,10 @@ public class FaviconServlet extends HttpServlet {
return null;
}
}
catch (IOException ioe) {
// We failed again so return null
return null;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment