add read-only webdav support#1415
Conversation
c6a083c to
6f082ad
Compare
svenstaro
left a comment
There was a problem hiding this comment.
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.
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
svenstaro
left a comment
There was a problem hiding this comment.
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.
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.
|
If the WebDAV is read only then enable-webdav can be enabled by default. Maybe on later releases once it's tested you can enable it. |
Adds read-only webdav support by (when indexing isn't disabled) routing OPTIONS/PROPFIND requests to a
DavHandlerfrom thewebdav-servercrate. Hidden files are excluded via a customDavFileSystem.