diff --git a/core/java/src/net/i2p/util/EepGet.java b/core/java/src/net/i2p/util/EepGet.java index ca5c0d55a..70913615c 100644 --- a/core/java/src/net/i2p/util/EepGet.java +++ b/core/java/src/net/i2p/util/EepGet.java @@ -507,7 +507,7 @@ public class EepGet { timeout.setInactivityTimeout(INACTIVITY_TIMEOUT); if (_redirectLocation != null) { - try { + //try { URL oldURL = new URL(_actualURL); String query = oldURL.getQuery(); if (query == null) query = ""; @@ -525,9 +525,10 @@ public class EepGet { if ( (_actualURL.indexOf('?') < 0) && (query.length() > 0) ) _actualURL = _actualURL + "?" + query; } - } catch (MalformedURLException mue) { - throw new IOException("Redirected from an invalid URL"); - } + // an MUE is an IOE + //} catch (MalformedURLException mue) { + // throw new IOException("Redirected from an invalid URL"); + //} _redirects++; if (_redirects > 5) throw new IOException("Too many redirects: to " + _redirectLocation); @@ -874,7 +875,7 @@ public class EepGet { if (_shouldProxy) { _proxy = InternalSocket.getSocket(_proxyHost, _proxyPort); } else { - try { + //try { URL url = new URL(_actualURL); if ("http".equals(url.getProtocol())) { String host = url.getHost(); @@ -885,9 +886,10 @@ public class EepGet { } else { throw new IOException("URL is not supported:" + _actualURL); } - } catch (MalformedURLException mue) { - throw new IOException("Request URL is invalid"); - } + // an MUE is an IOE + //} catch (MalformedURLException mue) { + // throw new IOException("Request URL is invalid"); + //} } _proxyIn = _proxy.getInputStream(); _proxyOut = _proxy.getOutputStream(); diff --git a/core/java/src/net/i2p/util/EepHead.java b/core/java/src/net/i2p/util/EepHead.java index 38438a402..938241616 100644 --- a/core/java/src/net/i2p/util/EepHead.java +++ b/core/java/src/net/i2p/util/EepHead.java @@ -117,7 +117,7 @@ public class EepHead extends EepGet { timeout.setInactivityTimeout(60*1000); if (_redirectLocation != null) { - try { + //try { URL oldURL = new URL(_actualURL); String query = oldURL.getQuery(); if (query == null) query = ""; @@ -135,9 +135,10 @@ public class EepHead extends EepGet { if ( (_actualURL.indexOf('?') < 0) && (query.length() > 0) ) _actualURL = _actualURL + "?" + query; } - } catch (MalformedURLException mue) { - throw new IOException("Redirected from an invalid URL"); - } + // an MUE is an IOE + //} catch (MalformedURLException mue) { + // throw new IOException("Redirected from an invalid URL"); + //} _redirects++; if (_redirects > 5) throw new IOException("Too many redirects: to " + _redirectLocation); diff --git a/core/java/src/net/i2p/util/SSLEepGet.java b/core/java/src/net/i2p/util/SSLEepGet.java index a4b589990..8a5bf364a 100644 --- a/core/java/src/net/i2p/util/SSLEepGet.java +++ b/core/java/src/net/i2p/util/SSLEepGet.java @@ -286,7 +286,7 @@ public class SSLEepGet extends EepGet { String req = getRequest(); - try { + //try { URL url = new URL(_actualURL); if ("https".equals(url.getProtocol())) { String host = url.getHost(); @@ -301,9 +301,10 @@ public class SSLEepGet extends EepGet { } else { throw new IOException("Only https supported: " + _actualURL); } - } catch (MalformedURLException mue) { - throw new IOException("Request URL is invalid"); - } + // an MUE is an IOE + //} catch (MalformedURLException mue) { + // throw new IOException("Request URL is invalid"); + //} _proxyIn = _proxy.getInputStream(); _proxyOut = _proxy.getOutputStream();