You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Lewis John McGibbney (JIRA)" <ji...@apache.org> on 2014/11/01 19:47:34 UTC

[jira] [Updated] (NUTCH-1878) urlnormalizer-regex to keep third slash in file:///path/index.html

     [ https://issues.apache.org/jira/browse/NUTCH-1878?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lewis John McGibbney updated NUTCH-1878:
----------------------------------------
    Fix Version/s:     (was: 2.3)
                   2.4

> urlnormalizer-regex to keep third slash in file:///path/index.html
> ------------------------------------------------------------------
>
>                 Key: NUTCH-1878
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1878
>             Project: Nutch
>          Issue Type: Sub-task
>          Components: protocol
>    Affects Versions: 1.9, 2.2.1
>            Reporter: Sebastian Nagel
>             Fix For: 2.4, 1.10
>
>         Attachments: NUTCH-1878-v1.patch
>
>
> The rule
> {code}
> <!-- removes duplicate slashes -->
> <regex>
>   <pattern>(?&lt;!:)/{2,}</pattern>
>   <substitution>/</substitution>
> </regex>
> {code}
> in {{regex-normalize.xml}} removes the third slash in {{file:///path/index.html}}. The resulting URL {{file://path/index.html}} fails to fetch because {{path}} is interpreted as host part of the URL as in {{file://localhost/path/index.html}}, cf. [wikipedia|http://en.wikipedia.org/wiki/File_URI_scheme], [RFC 1738|http://tools.ietf.org/html/rfc1738] (1994), and [RFC 3986|http://tools.ietf.org/html/rfc3986] (2005).
> (split as sub-task from NUTCH-1483)



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