jorcox / GeoCrawler

Apache License 2.0
3 stars 0 forks source link

Potencial bug en FetcherThread.handleRedirect #68

Closed fjlopez closed 8 years ago

fjlopez commented 8 years ago

El catch de

    try {
      String origHost = new URL(urlString).getHost().toLowerCase();
      String newHost = new URL(newUrl).getHost().toLowerCase();
      if (ignoreExternalLinks) {
        if (!origHost.equals(newHost)) {
          if (LOG.isDebugEnabled()) {
            LOG.debug(" - ignoring redirect " + redirType + " from "
                + urlString + " to " + newUrl
                + " because external links are ignored");
          }
          return null;
        }
      }

      if (ignoreInternalLinks) {
        if (origHost.equals(newHost)) {
          if (LOG.isDebugEnabled()) {
            LOG.debug(" - ignoring redirect " + redirType + " from "
                + urlString + " to " + newUrl
                + " because internal links are ignored");
          }
          return null;
        }
      }
    } catch (MalformedURLException e) { }

¿Es correcto que ignore la excepción?

jorcox commented 8 years ago

Será todo lo lógico que haya querido Apache porque la clase es suya jajajaja

fjlopez commented 8 years ago

Si es porun problema preexistente, márcalo como wontfix y ciérralo.