Version: 3.5.9 (using KDE 3.5.8) Installed from: Compiled From Sources Compiler: GCC i686-pc-linux-gnu-4.1.2 OS: Linux When trying to upload a file to a WebDAV share with Konqueror, this does not have any effect and sometimes issues an error, that the WebDAV root does not exist. This behavior results from a PROPFIND request that is issued before the actual PUT of the file, to check if the desired resource already exists on the server. The PROPFIND request returns status code 404, as expected, since the desired resource does not exist (yet). However, the 404 response seems to be caught in another place of the HTTP handling already, so that the desired PUT does not occur. The following patch fixes the issue (thanks to <SadEagle> on #kde-devel@Freenode): Index: http.cc =================================================================== --- http.cc (revision 829529) +++ http.cc (working copy) @@ -4545,7 +4545,7 @@ << " bytes left! can't close cache entry!\n"; } - if (sz <= 1) + if (sz <= 1 && m_request.method != DAV_PROPFIND) { /* kdDebug(7113) << "(" << m_pid << ") readBody: sz = " << KIO::number(sz) << ", responseCode =" << m_responseCode << endl; */
Created attachment 25951 [details] Patch to fix the PUT issue in kioslave/http
Is this an issue in KDE-4.2 as well?
I can confirm this bug for Qt: 4.4.3 KDE: 4.2.00 (KDE 4.2.0) Konqueror: 4.2.00 (KDE 4.2.0)
I can confirm this bug for KDE 4.2.1. I'm trying out the PHP WebDAV server from PEAR and I have debugged the WebDAV server's source and the problem is definitely like the original poster said. After PROPFIND gets a 404 from the server the PUT is never issued. I get an error message (File not found) every time when trying to create new files. Editing existing files works however. I cannot confirm whether the patch works as I'm using KDE from precompiled packages.
*** Bug 241360 has been marked as a duplicate of this bug. ***
Using the same WevDav server the following KDE versions work: 4.3.5 Gentoo, 4.4.4 Gentoo. 192.168.1.101 192.168.1.2 - [26/Jun/2010:11:35:35 -0500] "PROPFIND /public/404.html HTTP/1.1" 404 345 "-" "Mozilla/5.0 (compatible; Konqueror/4.4; Linux) KHTML/4.4.4 (like Gecko)" 192.168.1.101 192.168.1.2 - [26/Jun/2010:11:35:35 -0500] "PUT /public/404.html HTTP/1.1" 201 0 "-" "Mozilla/5.0 (compatible; Konqueror/4.4; Linux) KHTML/4.4.4 (like Gecko)" It does not work in a self compiled trunk KDE in Gentoo. It sends a PROPFIND but no PUT request to the server. 127.0.0.1 localhost - [26/Jun/2010:11:30:10 -0500] "PROPFIND /public/EV13p2.png HTTP/1.1" 404 345 "-" "Mozilla/5.0 (compatible; Konqueror/4.4) KHTML/4.4.90 (like Gecko)" 127.0.0.1 localhost - [26/Jun/2010:11:30:15 -0500] "PROPFIND /public/ HTTP/1.1" 207 910 "-" "Mozilla/5.0 (compatible; Konqueror/4.4) KHTML/4.4.90 (like Gecko)"
If I replace the kdelibs/kioslave/http folder in trunk with the version from the 4.4 branch I can upload files to the webserver.
SVN commit 1148486 by sandsmark: Avoid setting an error if we're doing a DAV propfind, and the file doesn't exist. CCBUG: 166081 M +3 -1 http.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1148486
patch applied, seems to work, and backported to 4.5 branch.
*** Bug 156454 has been marked as a duplicate of this bug. ***