nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Nagel (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (NUTCH-1878) urlnormalizer-regex to keep third slash in file:///path/index.html
Date Tue, 04 Nov 2014 21:15:34 GMT

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

Sebastian Nagel resolved NUTCH-1878.
------------------------------------
    Resolution: Won't Fix

Solution from NUTCH-1879 is preferred because URL.toString() returns file:/ URLs with a single
slash.

> 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)

Mime
View raw message