Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paths in multistatus PROPFIND response document have double slash (//) #19

Open
tedgin opened this issue Aug 10, 2020 · 4 comments
Open
Labels

Comments

@tedgin
Copy link

tedgin commented Aug 10, 2020

When a PROPFIND request is made on a collection with the URL https://host.domain/collection/, the paths to the members of /collection/ in the DAV:multistatus response document all have an extra forward slash in the URL immediately after the /collection/ prefix. For example, if object is a member of collection, its URL path in the response will be /collection//object. Here's a real example.

tedgin@dev ~? curl -u tedgin -H 'Depth: 1' -X PROPFIND https://data-dev.cyverse.rocks/dav/cyverse.dev/home/tedgin/IticketTest/
Enter host password for user 'tedgin':
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:">
<D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/">
<D:href>/dav/cyverse.dev/home/tedgin/IticketTest/</D:href>
<D:propstat>
<D:prop>
<D:creationdate>Wed, 30 Oct 2019 18:58:08 GMT</D:creationdate>
<D:getetag>"01572461888"</D:getetag>
<D:getlastmodified>Wed, 30 Oct 2019 18:58:08 GMT</D:getlastmodified>
<lp1:resourcetype><D:collection/></lp1:resourcetype>
<D:supportedlock>
<D:lockentry>
<D:lockscope><D:exclusive/></D:lockscope>
<D:locktype><D:write/></D:locktype>
</D:lockentry>
<D:lockentry>
<D:lockscope><D:shared/></D:lockscope>
<D:locktype><D:write/></D:locktype>
</D:lockentry>
</D:supportedlock>
<D:lockdiscovery/>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response xmlns:lp1="DAV:" xmlns:lp2="http://apache.org/dav/props/">
<D:href>/dav/cyverse.dev/home/tedgin/IticketTest//LICENSE.txt</D:href>
<D:propstat>
<D:prop>
<D:creationdate>Wed, 30 Oct 2019 18:58:24 GMT</D:creationdate>
<D:getcontentlength>3491</D:getcontentlength>
<D:getetag>"da3-01572461904"</D:getetag>
<D:getlastmodified>Wed, 30 Oct 2019 18:58:24 GMT</D:getlastmodified>
<lp1:resourcetype/>
<D:supportedlock>
<D:lockentry>
<D:lockscope><D:exclusive/></D:lockscope>
<D:locktype><D:write/></D:locktype>
</D:lockentry>
<D:lockentry>
<D:lockscope><D:shared/></D:lockscope>
<D:locktype><D:write/></D:locktype>
</D:lockentry>
</D:supportedlock>
<D:lockdiscovery/>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
@cjsmeele cjsmeele added the bug label Aug 10, 2020
@cjsmeele
Copy link
Contributor

Interesting, confirmed bug. Is this currently affecting/breaking a webdav client of yours?
It seems the commonly used clients over the past years haven't been bothered by this.
When/if clients end up sending follow-up requests with double slashes, they are currently normalized both by Apache and by iRODS path parsing to end up at the correct object.

@tedgin
Copy link
Author

tedgin commented Aug 13, 2020

It's not causing any issues that I know of. I noticed it while debugging an unrelated issue we were having.

@hurngchunlee
Copy link

Hi, I just run into an issue when using rclone (https://rclone.org). It throws an error:

2022/03/11 08:38:42 ERROR : /Dockerfile: Entry doesn't belong in directory "" (contains subdir) - ignoring

due to this extra / in the returned path.

@youngdjn
Copy link

I just encountered this same error with rclone.

tedgin added a commit to cyverse/ds-playbooks that referenced this issue Jan 26, 2024
tedgin added a commit to cyverse/ds-playbooks that referenced this issue Feb 14, 2024
tedgin added a commit to cyverse/ds-playbooks that referenced this issue Feb 14, 2024
tedgin added a commit to cyverse/ds-playbooks that referenced this issue Feb 14, 2024
tedgin added a commit to cyverse/ds-playbooks that referenced this issue Feb 15, 2024
tedgin added a commit to cyverse/ds-playbooks that referenced this issue Feb 16, 2024
tedgin added a commit to cyverse/ds-playbooks that referenced this issue Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants