maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Summers (JIRA)" <>
Subject [jira] [Commented] (WAGON-461) URL string not properly encoded by webdav
Date Mon, 15 Aug 2016 20:47:20 GMT


Mike Summers commented on WAGON-461:

We seem to be having a communication problem.

The webdav string comes from a pom:
                        <url> - Expert Services/IBM/</url>
                     <url>dav: Folders/Fit
- Expert Services/IBM</url>

It _is_ a valid webdav URI, it is simply not encoded properly by wagon-webdav. Adding the
one line of code to encode the URI fixes the problem. Hand encoding the URI in the POM does
not fix the problem.

Using wagon-ftp rather than wagon-webdav also works
 <url> - Expert Services/IBM/</url>
which seems to indicate the the encoding is not a plugin function.

_Is_ it the plugins job to encode the URI?

> URL string not properly encoded by webdav
> -----------------------------------------
>                 Key: WAGON-461
>                 URL:
>             Project: Maven Wagon
>          Issue Type: Bug
>          Components: wagon-webdav
>    Affects Versions: 2.10
>         Environment: All
>            Reporter: Mike Summers
> wagon-webdav is not calling EncodingUtil prior to instantiating MkColMethod which results
> {code:java}
> Caused by: java.lang.IllegalArgumentException: Invalid uri '
Folders/Fit - Expert Services/IBM/': escaped absolute path not valid
> {code}
> when there are special characters in the URI string.
> Changing line 153 of org.apache.maven.wagon.providers.webdav.WebDavWagon from
> {code:java}
>             method = new MkColMethod( url );
> {code}
> to
> {code:java}
>             method = new MkColMethod( EncodingUtil.encodeURLToString( url ) );
> {code}
> solves the issue although you may want to fix it elsewhere in the flow.

This message was sent by Atlassian JIRA

View raw message