[ 
https://issues.apache.org/jira/browse/NUTCH-2478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16288403#comment-16288403
 ] 

Sebastian Nagel commented on NUTCH-2478:
----------------------------------------

??resolve the missing protocol using the current page's protocol??

Yes, that's also done by {{new URL(fetchedUrl, baseHref)}}.

Meanwhile, I couldn't resist to start work. It's here: 
https://github.com/sebastian-nagel/nutch/commit/c0dd2a12a43a0bd7b244b6ff8bd0e26b12471d14
 (to do: port test to parse-tika). But we also can take your solution.


> // is not a valid base URL
> --------------------------
>
>                 Key: NUTCH-2478
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2478
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 1.13
>            Reporter: Markus Jelsma
>            Assignee: Markus Jelsma
>             Fix For: 1.14
>
>
> This test fails:
> {code}
>   @Test
>   public void testBadResolver() throws Exception {
>     URL base = new URL("//www.example.org/");
>     String target = "index/produkt/kanaly/";
>     
>     URL abs = URLUtil.resolveURL(base, target);
>     Assert.assertEquals("http://www.example.org/index/produkt/kanaly/";, 
> abs.toString());
>   }
> {code}
> and has to fail because of invalid base URL, so the current URL is used. If 
> current URL is not /, its path will be prepended, resulting in 404 being 
> crawled.
> This ticket must allow // as base, and resolve the protocol.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to