[ 
https://issues.apache.org/jira/browse/IVY-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624915#action_12624915
 ] 

Jim Bonanno commented on IVY-884:
---------------------------------

Marteen, 

I apologize but I would suggest that this patch be backed out. 

The issue is the pattern in the ivy file has to either be a string or a valid 
URI. 

Since the pattern can have tokens that get substituted like [org] it can not be 
a valid URI, therefore it should be treated as just a string.  If this is the 
case then space should be a space in the pattern, not %20. If the rules are the 
pattern is a string and it is the responsibility of the BasicURLHandler, for 
example,  to escape the URI after the substitutions have occurred,  then I 
think it will be easier to describe how to use it. Then there is no ambiguity 
of escaping the pattern.

I think the patch is ivy-885 is closer to the solution, where BasicURLHandler 
converts the URL string to an escaped URI.

But until this is figured out I think this fix is actually not correct anymore. 
I am really sorry.



> URLRepository does not allow some valid file scheme uri's
> ---------------------------------------------------------
>
>                 Key: IVY-884
>                 URL: https://issues.apache.org/jira/browse/IVY-884
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.0-beta-1
>            Reporter: Jim Bonanno
>            Assignee: Maarten Coene
>             Fix For: 2.0-RC1
>
>
> We hit an interesting problem when we set a valid uri in a URL resolver, but 
> the URLRepository could not list the repository.
> The problem was the uri was a file: scheme and the path had a space in it. 
> The toString method for URI will escape the space and replace them with %20. 
> URI.getPath will decode the %20 back into a space for listing, but 
> URL.getPath will not.
> URLRepository has support for the file: scheme, but uses URL to get the path 
> ( new URL(parent).getPath() ) instead of URI.
> Here is the fix we are using in list.
>         } else if (parent.startsWith("file")) {
>             try {
>                 String path = new URI(parent).getPath();
> This is probably not a common problem because it requires a URL resolver with 
> a URI using the file: scheme and a character that needs to be escaped, like a 
> space
> I looked at the current source and this is still an issue. We hit the issue 
> with beta-1 and currently stepping up to beta-2.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to