[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13987704#comment-13987704 ] Gary Gregory commented on VFS-428: -- Fine with me, RERO. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13987154#comment-13987154 ] Bernd Eckenfels commented on VFS-428: - Can we downgrade this bug to Major? I would like to have only Blocker Bugs which actually block a 2.1 release. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13588112#comment-13588112 ] Jean-Marc Borer commented on VFS-428: - Not sure HC3 and 4 can coexist: WebdavProvider inherits from HttpProvider. If the latter uses HC4, it will probably break the webdav provider which relies on Jackrabbit which in turn requires HC3. Tricky issue. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13588115#comment-13588115 ] Jean-Marc Borer commented on VFS-428: - I've found a solution for the trailing slashes that seems to work not too badly: in the HttpFileObject's setupMethod, I add a trailing slash to the requset path when VFS.isUriStyle is false and the file type is supposed to be a folder. protected void setupMethod(final HttpMethod method) throws FileSystemException, URIException { String pathEncoded = ((URLFileName) getName()).getPathQueryEncoded(urlCharset); if (!VFS.isUriStyle() (getName().getType() == FileType.FOLDER) !pathEncoded.endsWith(/) ) { pathEncoded = pathEncoded + /; } method.setPath(pathEncoded); method.setFollowRedirects(true); method.setRequestHeader(User-Agent, Jakarta-Commons-VFS); } This seems to work not too badly (at least with my unit tests), but it is required that that the file that is resolved in the first place ends with a trailing slash: FileObject fo = VFS.getManager().resolveFile(http://localhost:8080/dav/conf/test/;); DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13586963#comment-13586963 ] Jean-Marc Borer commented on VFS-428: - I am having the same kind of issues. After a long investigation whith try and errors, I found out: *) org.apache.commons.httpclient.methods.EntityEnclosingMethod.setFollowRedirects(false) is actually prevented by HTTPClient 3.x, because of RFC 2616. There is nothing you can do here. The solution would probably be to upgrade to HTTPClient 4, which seems to much better support redirection. However, even if VFS moves to the new version of HTTPClient, the Jackrabbit guys have not plans to upgrade: too much work and stick to to 3.x for a unknown time. *) trailing slash support is tricky apparently. I need it also for supporting list feature with HTTP scheme. However internally VFS wants paths without trailing slashes. This is fine if your webserver is configured to redirect paths without trailing slash to trailing ones. However this is problematic when you try to access the same path with WebDAV (my case) where the redirection will not be supported. Very tricky issue. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13587090#comment-13587090 ] Gary Gregory commented on VFS-428: -- Tangent: We should migrate to HTTPClient 4 anyway. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13587095#comment-13587095 ] Jean-Marc Borer commented on VFS-428: - Yes, but we have then either to convince the JackRabbit team to upgrade or use another webdav library like https://code.google.com/p/sardine/ which already uses HTTPClient 4 DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13587117#comment-13587117 ] Gary Gregory commented on VFS-428: -- VFS can migrate to HC 4 for HTTP[S]. What ever happens in the WebDAV provider is it's business. HC3 and 4 can coexist since they are packaged separately. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13587119#comment-13587119 ] Gary Gregory commented on VFS-428: -- 2) trailing slash support is tricky apparently. I need it also for supporting list feature with HTTP scheme. However internally VFS wants paths without trailing slashes. This is fine if your webserver is configured to redirect paths without trailing slash to trailing ones. However this is problematic when you try to access the same path with WebDAV (my case) where the redirection will not be supported. I've run into this pain as well :( I'm not sure how to proceed on this one yet... DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13425566#comment-13425566 ] Robert Kornmesser commented on VFS-428: --- {code} Unknown message with code Could not get property for: webdav://vfsusr:***@localhost/vfstest/, name=webdav://vfsusr:***@localhost/vfstest/, type=0, nameSet=[{DAV:}resourcetype], addEncoding=false.. org.apache.commons.vfs2.FileSystemException: Unknown message with code Could not get property for: webdav://vfsusr:***@localhost/vfstest/, name=webdav://vfsusr:***@localhost/vfstest/, type=0, nameSet=[{DAV:}resourcetype], addEncoding=false.. at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.doListChildrenResolved(WebdavFileObject.java:193) at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:888) at de.gfz.liferay.hooks.mediaRepository.webdav.TestWebdav.testLogin(TestWebdav.java:37) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Caused by: org.apache.commons.vfs2.FileSystemException: Could not get property for: webdav://vfsusr:***@localhost/vfstest/, name=webdav://vfsusr:***@localhost/vfstest/, type=0, nameSet=[{DAV:}resourcetype], addEncoding=false. at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:528) at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:481) at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:474) at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.getProperty(WebdavFileObject.java:466) at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.isDirectory(WebdavFileObject.java:446) at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.doListChildrenResolved(WebdavFileObject.java:145) ... 25 more Caused by: java.lang.IllegalArgumentException: Entity enclosing requests cannot be redirected without user intervention at org.apache.commons.httpclient.methods.EntityEnclosingMethod.setFollowRedirects(EntityEnclosingMethod.java:225) at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.setupMethod(WebdavFileObject.java:395) at org.apache.commons.vfs2.provider.webdav.WebdavFileObject.getProperties(WebdavFileObject.java:505) ... 30 more {code} The root cause was also visible before your update?! {code} Caused by: java.lang.IllegalArgumentException: Entity enclosing requests cannot be redirected without user intervention at org.apache.commons.httpclient.methods.EntityEnclosingMethod.setFollowRedirects(EntityEnclosingMethod.java:225) {code} So httpclient already denies setFollowRedirect. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13425753#comment-13425753 ] Gary D. Gregory commented on VFS-428: - I can see the root cause from your last post. I did not try the set up. It looks like the HttpClient 3.1 implementation is correct. I read this Javadoc in {{org.apache.commons.httpclient.methods.EntityEnclosingMethod.setFollowRedirects(boolean)}}: {quote} Entity enclosing requests cannot be redirected without user intervention according to RFC 2616. {quote} In RFC 2616, section 10.3.2, I read: {quote} If the 301 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued. {quote} See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3 When I look at JackRabbit 1.6.5 (the WebDAV library VFS uses), I see a that JR uses a class called org.apache.jackrabbit.webdav.client.methods.PropFindMethod. This is a custom JR WebDAV class. This explains the failure because it is neither an HTTP GET or HEAD. I'm not sure what to do here. There are many newer versions of JR available but I've not upgraded VFS because JR no longer delivers an all-in-one jar. You could try to use the current version of JR and see what happens. This may require changes to code and will certainly need some changes to the VFS POM. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424850#comment-13424850 ] Gary D. Gregory commented on VFS-428: - Oops, looks like we have an unrelated bug, the error message is missing. I created VFS-433 to address this side issue. DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13424933#comment-13424933 ] Gary D. Gregory commented on VFS-428: - Hi Robert, Can you please try again with latest from trunk? I fixed VFS-433 which should give us a useful error message. Thank you, Gary DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13420471#comment-13420471 ] Robert Kornmesser commented on VFS-428: --- Tried it inside my own project, because Maven Test still fails and I dont know if i can set a maven property to follow redirects. To my own testcase fails to with this new error: {code} DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (VFS-428) DavException: (301) Moved Permanently
[ https://issues.apache.org/jira/browse/VFS-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13420415#comment-13420415 ] Gary D. Gregory commented on VFS-428: - Please see VFS-432. Can you try the latest code from trunk? DavException: (301) Moved Permanently -- Key: VFS-428 URL: https://issues.apache.org/jira/browse/VFS-428 Project: Commons VFS Issue Type: Bug Affects Versions: 2.0, 2.1 Environment: Apache 2.2.22 as Testerver and setted up like http://commons.apache.org/vfs/testserver.html (but changed the 'crypt' password) Reporter: Robert Kornmesser Priority: Blocker Labels: webdav Running the WebdavProviderTestCase using mvn -P webdav clean test -Dtest.webdav.uri=webdav://vfsusr:vfstest@localhost/vfstest -Dtest=WebdavProviderTestCase results in {code}DavException: (301) Moved Permanently Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.645 sec FAILURE! Results : Tests in error: junit.framework.TestSuite@55c9be00(org.apache.commons.vfs2.provider.webdav.test.WebdavProviderTestCase$1): Could not determine the type of file webdav://vfsusr:@localhost/vfstest/read-tests. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 {code} The deeper Problem is, that the HttpClient using by VFS does not append a trailing slash and mod_dir of httpd has DirectorySlash On per default. So httpd send 301 redirect to the same url with / appended. I know that for this reason of problematic webdav client apache introduced redirect-carefully for some user agents using the BrowserMatch directive. So I just tried adding the following into my Directory directive {code} BrowserMatch ^Jakarta-Commons-VFS redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.0 redirect-carefully BrowserMatch ^Jakarta Commons-HttpClient/3.1 redirect-carefully {code} Its needed to have Jakarta-Commons-VFS *and* Jakarta Commons-HttpClient because of two requests from commons vfs using two different user agents. But instead of solving the issue, I get for every FileObject.getChildren() call at least one FileObject of type imaginary with the same basename as the parent. Thats not a problem at all (besides that this is totally wrong!) but deleting a parent just dont work anymore, because of an *non-existent* imaginary file inside the dir which cannot be deleted of course. To cut a long story short, what is the right httpd webdav server config to use 2.0 Release version of VFS? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira