-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
add read-only webdav support #1415
Conversation
c6a083c
to
6f082ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The webdav functionality should likely be put behind a flag. I suppose most people wouldn't want to run it with webdav activated.
Also, can you produce a test that shows that webdav at least works in some fashion?
Please rebase this! |
a533dd3
to
ee763fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see you use a real webdav client to check whether this does something useful. I think reqwest_dav would be suitable. Also I'd like to see you handle:
- Single file serving mode (new_file seems to easily handle this)
--route-prefix
/--random-route
--no-symlinks
d0812a1
to
3ab5706
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work, merging as-is!
// Make symlinks | ||
let symlink_directory_str = "symlink_directory"; | ||
let symlink_directory = server.path().join(symlink_directory_str); | ||
let symlinked_direcotry = server.path().join(DIRECTORIES[0]); | ||
symlink_dir(symlinked_direcotry, symlink_directory).unwrap(); | ||
|
||
let symlink_filename_str = "symlink_file"; | ||
let symlink_filename = server.path().join(symlink_filename_str); | ||
let symlinked_file = server.path().join(FILES[0]); | ||
symlink_file(symlinked_file, symlink_filename).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Memo to self: Maybe just refactor the integration tests dir fixtures in fixtures/mod.rs
to always have symlinks? Would likely allow us to cut a few lines from some tests.
Adds read-only webdav support by (when indexing isn't disabled) routing OPTIONS/PROPFIND requests to a
DavHandler
from thewebdav-server
crate. Hidden files are excluded via a customDavFileSystem
.