You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2023/09/16 11:18:00 UTC

[jira] [Commented] (VFS-844) UriString of webdav-filename is twice URLEncoded in moveTo operation

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

Gary D. Gregory commented on VFS-844:
-------------------------------------

[~beisetho] 

If you can provide a failing unit test that reproduces this issue, I can take a look.

> UriString of webdav-filename is twice URLEncoded in moveTo operation
> --------------------------------------------------------------------
>
>                 Key: VFS-844
>                 URL: https://issues.apache.org/jira/browse/VFS-844
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>            Reporter: Thorsten Beise
>            Priority: Blocker
>
> Twice URL encoding a filename which contains a blank results in invalid uriString.
>  
> {code:java}
> org.apache.commons.vfs2.FileSystemException: Could not rename "webdav4://admin:admin@localhost:53109/repository/default/write-tests/file%20space.txt" to "webdav4://admin:admin@localhost:53109/repository/default/write-tests/file1move.txt".
>     at org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1715)
>     at org.apache.commons.vfs2.ProviderRenameTests.moveFile(ProviderRenameTests.java:70)
>     at org.apache.commons.vfs2.ProviderRenameTests.testRenameFileWithSpaces(ProviderRenameTests.java:113)
>     at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
>     at java.base/java.lang.reflect.Method.invoke(Method.java:578)
>     at org.apache.commons.vfs2.AbstractProviderTestCase.runTest(AbstractProviderTestCase.java:305)
>     at junit.framework.TestCase.runBare(TestCase.java:142)
>     at junit.framework.TestResult$1.protect(TestResult.java:122)
>     at junit.framework.TestResult.runProtected(TestResult.java:142)
>     at junit.framework.TestResult.run(TestResult.java:125)
>     at junit.framework.TestCase.run(TestCase.java:130)
>     at junit.framework.TestSuite.runTest(TestSuite.java:241)
>     at junit.framework.TestSuite.run(TestSuite.java:236)
>     at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
>     at org.apache.commons.vfs2.AbstractTestSuite.lambda$run$0(AbstractTestSuite.java:235)
>     at junit.framework.TestResult.runProtected(TestResult.java:142)
>     at org.apache.commons.vfs2.AbstractTestSuite.run(AbstractTestSuite.java:239)
>     at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
>     at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>     at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
>     at org.junit.vintage.engine.execution.RunnerExecutor.execute(RunnerExecutor.java:42)
>     at org.junit.vintage.engine.VintageTestEngine.executeAllChildren(VintageTestEngine.java:80)
>     at org.junit.vintage.engine.VintageTestEngine.execute(VintageTestEngine.java:72)
>     at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:147)
>     at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:127)
>     at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:90)
>     at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:55)
>     at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:102)
>     at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:54)
>     at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
>     at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
>     at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
>     at org.apache.maven.surefire.junitplatform.LazyLauncher.execute(LazyLauncher.java:50)
>     at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:184)
>     at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:148)
>     at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:122)
>     at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
>     at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
>     at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
>     at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
> Caused by: org.apache.commons.vfs2.FileNotFoundException: Could not read from "http://admin:***@localhost:53109/repository/default/write-tests/file%2520space.txt" because it is not a file.
>     at org.apache.commons.vfs2.provider.webdav4.Webdav4FileObject.executeRequest(Webdav4FileObject.java:498)
>     at org.apache.commons.vfs2.provider.webdav4.Webdav4FileObject.doRename(Webdav4FileObject.java:453)
>     at org.apache.commons.vfs2.provider.AbstractFileObject.moveTo(AbstractFileObject.java:1706)
>     ... 39 more{code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)