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

Mike Summers commented on WAGON-461:
------------------------------------

The 409 is a result of the malformed URI. The exception message shows the 
encoded URI with escaped spaces has been further escaped- the space (%20) has 
been escaped to %2520 which is incorrect.
{color:red}
https://snafu.sharefile-webdav.com/Shared%2520Folders/Fit%2520-%2520Expert%2520Services/IBM/synthetics-monitor-plugin-1.0.0.jar.
{color}

The collection exists. wagon-webdav works _if_ WebDavWagon provides the 
encoding as required by org.apache.common.httpclient.HttpMethodBase(String uri)
{code:java}
/**
* Constructor specifying a URI.
* It is responsibility of the caller to ensure that URI elements
* (path & query parameters) are properly encoded (URL safe).
{code}


> URL string not properly encoded by webdav
> -----------------------------------------
>
>                 Key: WAGON-461
>                 URL: https://issues.apache.org/jira/browse/WAGON-461
>             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 in
> {code:java}
> Caused by: java.lang.IllegalArgumentException: Invalid uri 
> 'https://snafu.sharefile-webdav.com/Shared 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
(v6.3.4#6332)

Reply via email to