Bug 192844 - KDE webdavs ioslave no longer works - doesn't send authorization header
Summary: KDE webdavs ioslave no longer works - doesn't send authorization header
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: webdav (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 189760 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-16 04:21 UTC by Russ Tennant
Modified: 2009-10-06 14:44 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Russ Tennant 2009-05-16 04:21:16 UTC
Version:            (using KDE 4.2.2)
OS:                Linux
Installed from:    Ubuntu Packages

I use the KDE webdavs ioslave to connect to a webdav service. After upgrading to Ubuntu Jaunty (KDE 4.2.2), the webdavs ioslave no longer works. The site I connect to uses basic authentication. I checked the webdav ioslave and experienced the same problem. Looking at the transaction with Wireshark, It appears that the ioslave is not sending the Authorization header on the request following the first 401 response. I have also tried 4.2.3 and the problem still exists.

Ubuntu bug report: https://bugs.launchpad.net/ubuntu/+source/kde4libs/+bug/366457

Konqueror error page includes the following text:

 The requested operation could not be completed
 File or Folder Does Not Exist

Details of the Request:
 URL: webdav://qa.vipasuite.com/_files/
 Protocol: webdav
 Date and Time: Friday 24 April 2009 7:10 pm
 Additional Information: qa.vipasuite.com

Description:
 The specified file or folder /_files/ does not exist.

Possible Causes:
 You may have encountered a bug in the program.

Possible Solutions:
 Update your software to the latest version. Your distribution should provide tools to update your software.
 Contact your appropriate computer support system, whether the system administrator, or technical support group for further assistance.
Comment 1 saltini 2009-06-24 02:08:17 UTC
I can also confirm this bug, still present in both 4.2.4 stable and current beta 2 of 4.3 (4.2.90).

I've been able to use webdav / webdavs kioslave with previous kde 3.5.x and 4.x versions.

My webdav server is the php implementation of webdav protocol found in eGroupware 1.6.

Many thanks in advance.
Sauro Saltini.
Comment 2 Dmitry Kolosov 2009-07-30 23:13:23 UTC
I can confirm this bug too. Using kde4.2.4 with builtin Korganizer application. It does not even try to authenticate on 401 server response, just dropping an error. The same problem with Kaddressbook, and it seems problem in webdav handling. Please please fix it, i and co-workers in company can not access our contacts and calendar!
Comment 3 Dmitry Kolosov 2009-08-02 14:42:59 UTC
It's around line 2832 in kdelibs-4.2.4/kioslave/http/http.cpp file, i think. More than 800 changes was made since 3.5.10, where http\webdav works well. Many good peoples in header of this file are listed under Copyright section! We must thank them and ask to fix it ASAP, please!
Comment 4 Allen Winter 2009-08-02 14:51:52 UTC
Andreas, feel like taking a look at this?
Comment 5 Dmitry Kolosov 2009-08-09 02:00:12 UTC
Bug still exists after upgrading to 4.3.0. Must we choose another method of access calendars and contacts or bug will be fixed soon? It is critical to us, and if it will be fixed - we will wait, if not (or takes a long time) - we start migrating from webdav. To imap storage, or something.. Please, dear developers, just let us know - will it be fixed in month or not?
With great best regards and many thanks,
Dmitry.
Comment 6 Christian Reiner 2009-08-31 08:49:40 UTC
I also confirm this bug, same behaviour under kde-4.2.2 & 4.3. 
I filed Bug #189760 half a year ago. 
Webdav is broken in KDE.
Comment 7 Dmitry Kolosov 2009-08-31 19:48:02 UTC
Thanks to Matthew Dawson!
The patch (this one is for freebsd ports tree, but can be adapted if needed):
# cat /usr/ports/x11/kdelibs4/files/patch-http.cpp 
--- ./kioslave/http/http.cpp.orig       2009-08-31 19:39:43.000000000 +0400
+++ ./kioslave/http/http.cpp    2009-08-31 19:42:15.000000000 +0400
@@ -4355,7 +4355,7 @@
     if (m_request.responseCode >= 500 && m_request.responseCode <= 599) {
       error(ERR_INTERNAL_SERVER, m_request.url.host());
       return false;
-    } else if (m_request.responseCode >= 400 && m_request.responseCode <= 499) {
+    } else if (m_request.responseCode >= 400 && m_request.responseCode <= 499 && m_request.responseCode != 401) {
       error(ERR_DOES_NOT_EXIST, m_request.url.host());
       return false;
     }

Rebuild && Reinstall kdelibs4. Tested. Please, test it again and include in the distribution.
Mark ticket for closing?
Comment 8 saltini 2009-08-31 21:01:52 UTC
I can confirm the attached patch solves the problem (at least for me).
Many thanks to all, and especially to Matthew Dawson!

Sauro Saltini.
Comment 9 Fabian Köster 2009-09-02 12:15:35 UTC
This patch works also when applied to KDE 4.2.4. Please include it in 4.3-branch (and therefore KDE 4.3.2)
Comment 10 Jonathan Thomas 2009-09-04 20:44:25 UTC
*** Bug 189760 has been marked as a duplicate of this bug. ***
Comment 11 Jonathan Thomas 2009-10-06 14:44:44 UTC
A modified (better) version of this patch is included in KDE 4.3.2.