DICE-UNC/irods-webdav

Fix invalid paths when using a root path not at /

Closed this issue · 1 comments

per iPlant reports, check out path munging

I got the WebDAV server to work, but we seem to be having some issues with path on nested folder paths. The solution for now was to switch the root path to "/" instead of /iplant/home, just so that we could hit other datastores. This worked, however, it would repeat paths, like /iplant/home/iplant/home/dir/file instead of /iplant/home/dir/file, which could not be resolved.

Jerry had also mentioned that you were maybe working on some caching so that directories filled with lots of files/dirs could be listed quickly without actually going out and grabbing that structure every time.

issue when configured user home, doing upload or new folder in 'root' of view (top level of user home)

406732 [http-bio-8080-exec-59] INFO  org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory  - resolveFile()
406732 [http-bio-8080-exec-59] INFO  org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory  - host:dfc-test-tomcat1.edc.renci.org:8080
406732 [http-bio-8080-exec-59] INFO  org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory  - file:irods://test1@dfc-test-irods1.edc.renci.org:1247/dfc1/home/test1/eula.
1031.txt
406732 [http-bio-8080-exec-59] INFO  org.irods.jargon.core.pub.IRODSFileSystemAOImpl  - isFileExists()
406732 [http-bio-8080-exec-59] INFO  org.irods.jargon.core.pub.IRODSFileSystemAOImpl  - checking existence of: /dfc1/home/test1/eula.1031.txt
406732 [http-bio-8080-exec-59] INFO  org.irods.jargon.core.pub.IRODSFileSystemAOImpl  - getObjStat(final String irodsAbsolutePath)
406732 [http-bio-8080-exec-59] INFO  org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAOImpl  - retrieveObjectStatForPathWithHeuristicPathGuessing()
406732 [http-bio-8080-exec-53] INFO  org.irods.jargon.core.pub.CollectionAndDataObjectListAndSearchAOImpl  - got a file not found, try to heuristically produce an objstat
406732 [http-bio-8080-exec-53] INFO  org.irods.jargon.core.pub.CollectionIteratorAOImpl  - handleNoObjStatUnderRootOrHomeByLookingForPublicAndHome()
406732 [http-bio-8080-exec-53] INFO  org.irods.jargon.core.pub.CollectionIteratorAOImpl  - really is a not found for file:/dfc1/home/test1/eula.1033.txt
406732 [http-bio-8080-exec-53] INFO  org.irods.jargon.core.pub.IRODSFileSystemAOImpl  - file not found, will treat as not exists
406732 [http-bio-8080-exec-53] INFO  org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory  - file not found, will return shell iRODS file: /dfc1/home/test1/eula.1033.tx
t
406732 [http-bio-8080-exec-53] INFO  org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory  - resolved as resource:null
406732 [http-bio-8080-exec-53] DEBUG org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory  - getResource: host: dfc-test-tomcat1.edc.renci.org:8080 - url:/irods-webdav
406732 [http-bio-8080-exec-53] DEBUG org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory  - stripped context:
406732 [http-bio-8080-exec-53] INFO  org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory  - resolvePath()
406732 [http-bio-8080-exec-53] ERROR io.milton.http.StandardFilter  - exception sending content
java.lang.IllegalArgumentException: null or empty url
        at org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory.resolvePath(IrodsFileSystemResourceFactory.java:171)
        at org.irods.jargon.webdav.resource.IrodsFileSystemResourceFactory.getResource(IrodsFileSystemResourceFactory.java:109)
        at io.milton.http.json.JsonResourceFactory.getResource(JsonResourceFactory.java:97)
        at io.milton.http.http11.PutHelper.findNearestParent(PutHelper.java:180)
        at io.milton.http.http11.PutHelper.findNearestParent(PutHelper.java:190)
        at io.milton.http.http11.PutHandler.process(PutHandler.java:158)
        at io.milton.http.StandardFilter.process(StandardFilter.java:49)
        at io.milton.http.FilterChain.process(FilterChain.java:40)
        at io.milton.http.HttpManager.process(HttpManager.java:158)
        at io.milton.servlet.SpringMiltonFilter.doMiltonProcessing(SpringMiltonFilter.java:260)
        at io.milton.servlet.SpringMiltonFilter.doFilter(SpringMiltonFilter.java:236)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.irods.jargon.webdav.authfilter.BasicAuthFilter.doFilter(BasicAuthFilter.java:90)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:931)