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

Remove path prefix only if $path contains prefix #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ander7agar
Copy link

I am testing a webdav implementation with Nginx on Debian 10. I have encountered an error trying to list the contents of a directory. The problem is that in the listContents function it removes as many characters as the prefix of the path, even if the path returned by the webdav server does not contain the prefix. This causes the necessary part of the returned file paths to be removed.

In my case the following happened:
Prefix: http://192.168.0.103:20000/
Route returned by webdav: /uploads/user/8546/2020-06-12
Result: 06-12

@kesselb
Copy link

kesselb commented Jun 22, 2020

Looks good to me 👍

And if I understand https://tools.ietf.org/html/rfc4918#section-8.3 correct relative urls are allowed. Would be nice to have a test case for it ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants