Bug 397084

Summary: WebDav delete does not work on files
Product: [Frameworks and Libraries] frameworks-kio Reporter: Stefano <sda0786>
Component: WebDAVAssignee: David Faure <faure>
Status: REPORTED ---    
Severity: normal CC: Buo.Ren.Lin, elvis.angelaccio, kdelibs-bugs
Priority: NOR    
Version: 5.44.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot

Description Stefano 2018-08-02 09:18:50 UTC
Created attachment 114266 [details]
Screenshot

Hi, 
I connected to my webdav folder (synology server) and tried to delete a file like 'testFile.txt' and a folder called 'testFolder'. 
When I delete the file, I get back the response "An unexpected error (400) occurred while attempting to delete the specified file or folder".
When I delete the folder no issue is present.

as attachment a some screenshot with WebDav Log and dolph message

also from forum:
https://forum.kde.org/viewtopic.php?f=224&t=151993

I'm running on kubuntu 18.04 

Really thanks!
Stefano
Comment 1 ๆž—ๅšไป(Buo-ren, Lin) 2020-04-15 17:14:27 UTC
I can reproduce this issue, server-side log:

```
webdav    | [Wed Apr 15 17:12:52.294803 2020] [dav:error] [pid 100:tid 140470051162912] [client 192.168.192.1:50716] Could not fetch resource information.  [400, #0]
webdav    | [Wed Apr 15 17:12:52.294825 2020] [dav:error] [pid 100:tid 140470051162912] [client 192.168.192.1:50716] The URL contains extraneous path components. The resource could not be identified.  [400, #0]
webdav    | 192.168.192.1 - - [15/Apr/2020:17:12:52 +0000] "DELETE /docker-compose.yml/ HTTP/1.1" 400 226 "-" "Mozilla/5.0 (X11; Linux x86_64) KHTML/5.47.0 (like Gecko) Konqueror/5 KIO/5.47"
```

It appears that an extraneous slash has been appended to the request, thus the error.