Project

General

Profile

[Solved] WebDAV as CGI (=> no; use third-party)

Added by stokito 8 days ago

Is it possible to make the mod_webdav as a regular CGI? Then it can be used with other servers e.g. OpenWrt uhttpd and BusyBox httpd.
Even with a limited functionality that can be useful for small devices.
Is something that is needed to be a module? I see the only reason is to have a configuration.


Replies (4)

RE: WebDAV as CGI - Added by stokito 8 days ago

I had the idea a year ago and even created an empty repo https://github.com/yurt-page/cgi-webdav

RE: WebDAV as CGI - Added by gstrauss 8 days ago

Is it possible to make the mod_webdav as a regular CGI?

Yes, it is possible. No, it is not a priority for lighttpd development. (tl;dr: No.)

There are numerous already-existing CGI implementations of WebDAV. For example, NextCloud and OwnCloud, both which sit on top of SabreDAV. Those are just two examples. It is likely there are others.


As advised in #3188: you should build the lighttpd openwrt package without the features you do not want. lighttpd supports building mod_webdav without those features.

RE: [Solved] WebDAV as CGI (=> no; use third-party) - Added by stokito 8 days ago

Thank you. I'm asking the confusing questions because I have different stages to implement my project of self hosting at home on cheap devices:
1. I'll compile my own OpenWrt firmware with everything needed or disabled for 16mb routers. Here I can compile the Lighttpd and pre-configure it.
2. Then I'll try to make everything work on a vanilla OpenWrt but with additional configuration. Ideally just copy files but some SSH and command may be needed. Here I need to make a configuration atomic in separate files so that a package update won't override a config file. Also for the vanilla OpenWrt we need to install the Lighttpd.
3. I'll try to make the vanilla OpenWrt to have the functionality. I'll have to ask OpenWrt devs to include all needed functionality (I already sent few patches). A user should just click on UI to enable WebDAV. But this means that I have to use the uhttpd only and it doesn't have the WebDAV. The CGI might help here.
4. Support of smaller devices e.g. 4mb. Here I thinking to use the BusyBox httpd (8kb) and again the CGI is the only option.

So at this moment I'm on the stage 1 but anyway I trying to make some work for the future stages or at least to understand better.

RE: [Solved] WebDAV as CGI (=> no; use third-party) - Added by gstrauss 8 days ago

WebDAV has lots of nice features, but why is WebDAV a critical feature on routers with <= 16 MB memory? (Routers with 64MB memory should be able to run the router software plus lighttpd mod_webdav without an issue.)

As I posted in #3188:
If you want to minimize the dependencies of openwrt lighttpd-mod-webdav package to have WebDAV without support for PROPPATCH, LOCK, and UNLOCK, then I would suggest that you write a small patch to openwrt/packages/net/lighttpd/Makefile to add a new package lighttpd-mod-webdav_min, and patch lighttpd src/meson.build to build a new mod_webdav_min.so alongside the existing lighttpd build of mod_webdav.so. If meson.build is patched properly, mod_webdav_min.so would be built without support for PROPPATCH, LOCK, and UNLOCK, and without link dependencies on libxml2, libsqlite3, and libuuid. The OpenWRT build of lighttpd is not going to change lighttpd-mod-webdav, but if you write and propose a patch to github/openwrt as I described above, then there can be an additional package lighttpd-mod-webdav_min for you to use.

    (1-4/4)