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

Sebastian Nagel commented on NUTCH-2145:
----------------------------------------

The problem is caused by URLUtil.toASCII(String url) which uses
* URL [[new URL(String 
spec)|http://docs.oracle.com/javase/7/docs/api/java/net/URL.html#URL%28java.lang.String%29]]
 to split the initial URL string into protocol, host, port, etc.
* URI [[new URI(String scheme, ..., String 
fragment)|http://docs.oracle.com/javase/7/docs/api/java/net/URI.html#URI%28java.lang.String,%20java.lang.String,%20java.lang.String,%20int,%20java.lang.String,%20java.lang.String,%20java.lang.String%29]]
 to put the parts together again. Here the percents in the path are escaped 
again.

Mixing URL and URI is not applicable. Maybe we can use urlnormalizer-basic 
after NUTCH-2064 is done.

> parse/index checker fail to fetch valid percent-encoded URLs
> ------------------------------------------------------------
>
>                 Key: NUTCH-2145
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2145
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 2.3, 1.11
>            Reporter: Sebastian Nagel
>
> Parsechecker and indexchecker fail to fetch valid URLs containing 
> percent-encoded characters. The percent-encoding is broken by escaping % 
> again:
> {noformat}
> % bin/nutch parsechecker 'https://de.wikipedia.org/wiki/%C3%84sop'
> fetching: https://de.wikipedia.org/wiki/%25C3%2584sop
> Fetch failed with protocol status: gone(11), lastModified=0: 
> https://de.wikipedia.org/wiki/%25C3%2584sop
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to