Diffusion KIO c6b5750b9527

Fix WebDAV directory renaming if KeepAlive is off

Authored by hoffmannrobert on Mar 22 2019, 9:56 AM.

Description

Fix WebDAV directory renaming if KeepAlive is off

Summary:
Reset m_request.isKeepAlive to true if responseCode == 301
during renaming a directory. Otherwise the connection is gone
and renaming fails, if the server is configured 'KeepAlive off'.

After sending the not quite correct request 'MOVE dirurl'
without trailing '/', an Apache webserver answers with a
redirection (301) providing the correct dirurl with trailing
'/'. But in this case the session is not reset, so if the
server sets isKeepAlive to false the connection is ended
too early.

Test Plan:

  • Configure an Apache http server providing WebDAV and set KeepAlive to 'off'.
  • In dolphin, navigate to webdav://webdavserver/ and try to rename a directory there.
  • Without this patch the connection to webdavserver is broken (error message) and renaming fails, with this patch applied it works.

Reviewers: Frameworks, Dolphin, dfaure, sitter

Reviewed By: sitter

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D19786

Details

Committed
sitterMar 22 2019, 10:19 AM
Reviewer
sitter
Differential Revision
D19786: Fix WebDAV directory renaming if KeepAlive is off
Parents
R241:523acf53dadc: Show list of tags in PlacesView
Branches
Unknown
Tags
Unknown