Project

General

Profile

File Transfer from Windows File Explorer

Added by nikhilmahale about 4 years ago

Hello,
In my project it is required that we are able to do file transfer with lighttpd server from Windows File Explorer using drag and drop.

1.To support PUT requests, I have enabled mod_webdav module.
2.The file transferred worked on other webdav supported tools like WinSCP but did not work with Windows File Explorer.
3.After analyzing HTTP packets over WireShark, I observed that the Windows is sending PROPPATCH and PROPFIND commands as well to server which were not enabled. When it does not get response to these commands, it DELETEs the file it has uploaded.
4. I used --with-webdav-props build option to enable these commands. This option also required libxml2 and sqlite packages which the environment already had (only the packages had to be enabled).
5. After enabling the commands I was able to do file transfer with Windows. Also the lighttpd acceslog shows that Windows repeatedly sends PROPFIND and PROPPATCH commands.
6. I also faced issue when authentication was enabled, but the requirement does not need authentication hence it has been disabled.

My question is whether the --with-webdav-props build option is necessary to make server work with Windows File Explorer. Why I ask this is enabling the additional libxml2 package is using 7-8% of rootfs size which is already limited.

Additional Details:
lighttpd version: 1.4.54
Embedded target device kernel version: 2.6.37.6
Clients Used: cURL, WinSCP, Windows File Explorer
Also attaching build spec file and server conf file.

lighttpd.spec (1.64 KB) lighttpd.spec lighttpd build spec file
lighttpd.conf (2.31 KB) lighttpd.conf lighttpd Configuration File

Replies (3)

RE: File Transfer from Windows File Explorer - Added by gstrauss about 4 years ago

lighttpd uses libxml2 to process the XML in PROPFIND and PROPPATCH requests, so if that is required for Windows File Explorer to work, then as you have discovered, you must use lighttpd mod_webdav after building with ./configure --with-webdav-props ...

If disk size is an issue, you might consider stripping (man strip) the lighttpd binaries ('lighttpd' as well as 'mod_webdav.so' and other binary modules). I think you'll find that saves a significant amount of disk space.

RE: File Transfer from Windows File Explorer - Added by gstrauss about 4 years ago

BTW, please use lighttpd 1.4.55 which fixes some bugs in mod_webdav in lighttpd 1.4.54. (#2958) (#2970)

RE: File Transfer from Windows File Explorer - Added by nikhilmahale about 4 years ago

Thanks for the quick reply. I will surely try to upgrade to 1.4.55.
We are working on removing unnecessary binaries from device as well so that may also help to reduce disk consumption.

Have you come across any developer who may have configured the server with Windows File Explorer without using the --with-webdav-props option (eliminating dependency on other packages)?

Today, I tried lighttpd server on Ubuntu (18.04.3 LTS Bionic Beaver). Here also I observed that PROPATCH and PROPFIND commands are being sent and the client getting valid replies for them. Even though I could not find the build options in the Ubuntu's lighttpd package, I think it is already being built using ./configure --with-webdav-props.

    (1-3/3)