caddy-webdav icon indicating copy to clipboard operation
caddy-webdav copied to clipboard

LOCK/UNLOCK and other Webdav method support

Open arichiardi opened this issue 10 months ago • 5 comments

Hi there, really liking caddy and learning a bunch, while trying to contribute a bit! To the forum.

I was wondering if you see this plugin evolving so that it can support class 1 or class 2 WebDAV.

My current need does not involve anything fancy but it would be nice to stay with caddy if the need for a lock, for instance, arises.

Thanks for your effort!

arichiardi avatar Aug 17 '23 02:08 arichiardi

Sometimes, LOCK/UNLOCK can be real nightmare

ArcCal avatar Aug 17 '23 02:08 ArcCal

I don't actually know too much about webdav. :sweat_smile: I just made this to do a very simple thing some time ago.

If you'd like it to do more, I'm happy to work on this to fulfill the requirements of sufficiently-tiered sponsors! Or anyone else is welcome to pick up development for advanced features/functionality.

All I know about our particular implementation is from the library godocs that we use: https://pkg.go.dev/golang.org/x/net/webdav

It does look like there is an in-memory implementation of a lock system: https://pkg.go.dev/golang.org/x/net/webdav#NewMemLS

mholt avatar Aug 17 '23 02:08 mholt

Ah wait a sec that is already pretty comprehensive!

It even passes (I guess) the litmus test according to this.

That's a relief and I guess I can actually close this issue, apologise for the noise and thank you for the links!

arichiardi avatar Aug 17 '23 03:08 arichiardi

Just out of curiosity, are you planning to backport this fix upstream?

I wonder why the lib differs there...

arichiardi avatar Aug 17 '23 04:08 arichiardi

That was contributed by @mcieno -- I'm not sure I know enough about that either :sweat_smile:

Glad that page answered your question!

mholt avatar Aug 17 '23 04:08 mholt