Bug 241360 - Cannot upload files to ownCloud
Summary: Cannot upload files to ownCloud
Status: RESOLVED DUPLICATE of bug 166081
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: webdav (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-11 01:01 UTC by Andrei Nistor
Modified: 2010-06-25 23:16 UTC (History)
4 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 Andrei Nistor 2010-06-11 01:01:26 UTC
Version:           unspecified (using Devel) 
OS:                Linux

I am trying to uplad files through Dolphin using the webdav:// protocol to my ownCloud server. It fails with the error message "The file or folder ... does not exist". I was successful with the command line client cadaver though, so this suggests it's an issue with the webdav kio.

Creating folders works, though.

Reproducible: Always




OS: Linux (x86_64) release 2.6.33.5-112.fc13.x86_64
Compiler: gcc
Comment 1 Robin Appelman 2010-06-22 03:03:45 UTC
I've done some more debugging on the server side for this problem and I seem to have found something that seems to be the problem here.

During the upload, the client (kio) makes a propfind request for the file that you're trying to upload the local file to (to check if the file exists/get mime-type and file length of the file if it exists?), if the file does not exists, we return a 404 (as we should).
kio, seems to fall over this and gives the error the file (that we are trying to upload the local file to) does not exist.

When I comment out the line that raises the 404 error, uploading seems to work fine but it asks you if you want to overwrite an empty file.
Comment 2 David Palacio 2010-06-22 20:14:23 UTC
I think this is bug 166081

@icewind: what line do you comment?
Comment 3 Robin Appelman 2010-06-22 20:27:47 UTC
Lines 591 and 592 in inc/HTTP/WebDAV/Server.php

591: $this->http_status("404 Not Found");
592: return;

and it does seem like it is bug 166081
Comment 4 Stefan Borggraefe 2010-06-24 21:03:40 UTC
Confirming with KDE 4.4.86 (OpenSuse 11.2 packages) and apache2.2-ssl (Debian 5.0 packages).

Contrary to what bug 166081 states I see a PUT request after the PROPFIND request in apache's ssl_access.log:

93.233.x.y - admin [24/Jun/2010:18:59:33 +0000] "PROPFIND /oc/webdav/owncloud.php HTTP/1.1" 207 913 "-" "Mozilla/5.0 (compatible; Konqueror/4.4; Linux) KHTML/4.4.86 (like Gecko) SUSE"                                                                            
93.233.x.y - admin [24/Jun/2010:18:59:33 +0000] "PROPFIND /oc/webdav/owncloud.php/gross.jpg HTTP/1.1" 404 - "-" "Mozilla/5.0 (compatible; Konqueror/4.4; Linux) KHTML/4.4.86 (like Gecko) SUSE"                                                                    
93.233.x.y - - [24/Jun/2010:18:59:34 +0000] "PUT /oc/webdav/owncloud.php/gross.jpg HTTP/1.1" 400 391 "-" "Mozilla/5.0 (compatible; Konqueror/4.4; Linux) KHTML/4.4.86 (like Gecko) SUSE"
Comment 5 Andrei Nistor 2010-06-25 00:27:12 UTC
that's the intended behaviur. as I understand it, the client issues a PROPFIND to check if a file exists, then the clients issues a PUT (possibly prompting the user if he wants to overwrite it). someone correct me if I'm wrong.

The problem is that kio_webdav believes that the file it is trying to upload does not exist, because it got a 404 for the PROPFIND. That's why modifying files works...
Comment 6 Martin Sandsmark 2010-06-25 23:16:35 UTC

*** This bug has been marked as a duplicate of bug 166081 ***