Bug 334192 - WebDAV PUT over SSL doesn't work (copying with Dolphin to webdavs:// server)
Summary: WebDAV PUT over SSL doesn't work (copying with Dolphin to webdavs:// server)
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Unmaintained
Component: webdav (show other bugs)
Version: 4.11.5
Platform: Mageia RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Dawit Alemayehu
URL:
Keywords:
: 337338 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-05-01 19:22 UTC by Nazar554
Modified: 2015-02-12 13:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.2
Sentry Crash Report:


Attachments
kio_http logfile (20.39 KB, text/plain)
2014-05-06 12:58 UTC, Nazar554
Details
kio_http_debug logfile (46.88 KB, text/plain)
2014-05-06 12:59 UTC, Nazar554
Details
kio_http 4.14.3 (4.86 KB, text/plain)
2015-02-12 13:56 UTC, Nikita Krupenko
Details
kio_http_debug 4.14.3 (8.99 KB, text/plain)
2015-02-12 13:57 UTC, Nikita Krupenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nazar554 2014-05-01 19:22:08 UTC
When I copy a large file (1.4GB) over webdav server drops connection. Speed of copying is unusually high (60MB/s) and when I check error logs of the server it says that client sent bad request(HTTP error code 400). Actually the file doesn't even get send, it is first copied to /tmp named .kio-(something). Because /tmp is mounted as tmpfs it quickly rans out of space and the file is never send.

Reproducible: Always

Steps to Reproduce:
1. Connect to a webdav(s):// server using Dolphin
2. Drag and drop the file to copy/move it
3. See the copying start at high speed but never finish. /tmp is reported as full later
Actual Results:  
File transfer fails, /tmp is full.

Expected Results:  
KIO reads file right from my directory without filling up my small(1.9GB) /tmp .

I am unsure if it happens with both SSL and non SSL webdav. Sending the file with other webdav clients works(cadaver, ES File Explorer on Android, Windows Explorer). Server is Apache 2.4 OpenSSL 1.0.1g with self-signed certificate (I accepted it). In dolphin I connect to it using webdavs://192.168.0.3/dav - (server is in my LAN).
Comment 1 Dawit Alemayehu 2014-05-06 12:07:44 UTC
The file should not get copied to your /tmp folder if you did not choose to copy it there. Please install the debug package for kdelibs for your distro. Here is a link where you can find said debug packages:

http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports#Mageia

Then follow the guide at the URL below to enable debug output for kio_http:

http://techbase.kde.org/Development/Tutorials/Debugging/Debugging_IOSlaves#How_to_get_debug_output

The debug areas that should be enabled are 7103 and 7113. Do not forget to remove any sensitive information from the debug output before posting it here.
Comment 2 Nazar554 2014-05-06 12:58:35 UTC
Created attachment 86488 [details]
kio_http logfile
Comment 3 Nazar554 2014-05-06 12:59:00 UTC
Created attachment 86489 [details]
kio_http_debug logfile
Comment 4 Nazar554 2014-05-06 13:02:47 UTC
I added the log files. The LAN server is anonymous, I don't have any authentication there. Also after reading the logs I think that the problem is the HTTP cache. 
When I was sending the file mentioned in the logs it did this:
1. Made a 1.6GB file in /tmp (i still had 350MB free)
2. Process kio_http started eating all of my RAM and swap (I killed it at 33.3% because it started to lag when swapping)
3. I killed it by stop button from KDE tasks
Comment 5 Dawit Alemayehu 2014-05-07 11:59:04 UTC
(In reply to comment #4)
> I added the log files. The LAN server is anonymous, I don't have any
> authentication there. Also after reading the logs I think that the problem
> is the HTTP cache. 
> When I was sending the file mentioned in the logs it did this:
> 1. Made a 1.6GB file in /tmp (i still had 350MB free)
> 2. Process kio_http started eating all of my RAM and swap (I killed it at
> 33.3% because it started to lag when swapping)
> 3. I killed it by stop button from KDE tasks

Ahh... I assumed this was a download operation, remote file -> local, but it was not. It is an upload operation, local file -> remote. Hence, I now understand why the temporary file is being created. It is a flaw in the kio_http code. I will take care of it.
Comment 6 Dawit Alemayehu 2014-10-02 12:47:50 UTC
Git commit f040d0852899e383af5bc3ba1c1a49f31b69172e by Dawit Alemayehu.
Committed on 29/09/2014 at 03:15.
Pushed by adawit into branch 'KDE/4.14'.

Added 'copyFromFile' support to webdav.
FIXED-IN: 4.14.2
REVIEW: 120418

M  +122  -60   kioslave/http/http.cpp
M  +10   -0    kioslave/http/http.h
M  +1    -0    kioslave/http/webdav.protocol

http://commits.kde.org/kdelibs/f040d0852899e383af5bc3ba1c1a49f31b69172e
Comment 7 Dawit Alemayehu 2014-10-10 02:11:17 UTC
Git commit 3167510f887bb6b2ebc849a91bfebe1319ad1837 by Dawit Alemayehu.
Committed on 10/10/2014 at 02:03.
Pushed by adawit into branch 'master'.

frameworks port of commit f040d08:

Added 'copyFromFile' support to webdav.

M  +119  -57   src/ioslaves/http/http.cpp
M  +10   -0    src/ioslaves/http/http.h

http://commits.kde.org/kio/3167510f887bb6b2ebc849a91bfebe1319ad1837
Comment 8 Dawit Alemayehu 2014-10-11 11:29:53 UTC
*** Bug 337338 has been marked as a duplicate of this bug. ***
Comment 9 Nikita Krupenko 2015-02-12 13:56:54 UTC
Created attachment 91038 [details]
kio_http 4.14.3

I have version 4.14.3 and still cannot upload big files over WebDAV - it just disconnects at the end.
Comment 10 Nikita Krupenko 2015-02-12 13:57:29 UTC
Created attachment 91039 [details]
kio_http_debug 4.14.3