fix #1154: relative Destination header in WebDAV MOVE

This commit is contained in:
antelle 2019-08-24 07:37:08 +02:00
parent 80c44c4c03
commit cbbf5f833a
2 changed files with 5 additions and 9 deletions

View File

@ -178,15 +178,10 @@ const StorageWebDav = StorageBase.extend({
return cb({ revConflict: true }, xhr, stat);
}
let movePath = path;
if (movePath.indexOf('://') < 0) {
if (movePath.indexOf('/') === 0) {
movePath =
location.protocol + '//' + location.host + movePath;
} else {
movePath = location.href
.replace(/\?(.*)/, '')
.replace(/[^/]*$/, movePath);
}
if (movePath.includes('://')) {
movePath = movePath.replace(/^\w+:\/\/[^\/]+/, '');
} else if (!movePath.startsWith('/')) {
movePath = location.pathname.replace(/[^/]*$/, movePath);
}
that._request(
_.defaults(

View File

@ -2,6 +2,7 @@ Release notes
-------------
##### v1.10 (TBD)
`+` config option to disable xml export (canExportXml)
`-` fix #1154: relative Destination header in WebDAV MOVE
##### v1.9.3 (2019-08-25)
`-` fixed group settings not being displayed