fix #1305: WebDAV issues

This commit is contained in:
antelle 2019-10-15 20:02:44 +02:00
parent bc4dbc7de2
commit be79f67510
2 changed files with 21 additions and 18 deletions

View File

@ -100,9 +100,9 @@ class StorageWebDav extends StorageBase {
const that = this; const that = this;
this._request( this._request(
{ {
...saveOpts,
op: 'Save:stat', op: 'Save:stat',
method: 'HEAD', method: 'HEAD'
...saveOpts
}, },
(err, xhr, stat) => { (err, xhr, stat) => {
let useTmpPath = this.appSettings.webdavSaveMethod !== 'put'; let useTmpPath = this.appSettings.webdavSaveMethod !== 'put';
@ -120,12 +120,12 @@ class StorageWebDav extends StorageBase {
if (useTmpPath) { if (useTmpPath) {
that._request( that._request(
{ {
...saveOpts,
op: 'Save:put', op: 'Save:put',
method: 'PUT', method: 'PUT',
path: tmpPath, path: tmpPath,
data, data,
nostat: true, nostat: true
...saveOpts
}, },
err => { err => {
if (err) { if (err) {
@ -133,17 +133,17 @@ class StorageWebDav extends StorageBase {
} }
that._request( that._request(
{ {
...saveOpts,
op: 'Save:stat', op: 'Save:stat',
method: 'HEAD', method: 'HEAD'
...saveOpts
}, },
(err, xhr, stat) => { (err, xhr, stat) => {
if (err) { if (err) {
that._request({ that._request({
...saveOpts,
op: 'Save:delete', op: 'Save:delete',
method: 'DELETE', method: 'DELETE',
path: tmpPath, path: tmpPath
...saveOpts
}); });
return cb(err, xhr, stat); return cb(err, xhr, stat);
} }
@ -156,10 +156,10 @@ class StorageWebDav extends StorageBase {
rev rev
); );
that._request({ that._request({
...saveOpts,
op: 'Save:delete', op: 'Save:delete',
method: 'DELETE', method: 'DELETE',
path: tmpPath, path: tmpPath
...saveOpts
}); });
return cb({ revConflict: true }, xhr, stat); return cb({ revConflict: true }, xhr, stat);
} }
@ -176,6 +176,7 @@ class StorageWebDav extends StorageBase {
} }
that._request( that._request(
{ {
...saveOpts,
op: 'Save:move', op: 'Save:move',
method: 'MOVE', method: 'MOVE',
path: tmpPath, path: tmpPath,
@ -183,8 +184,7 @@ class StorageWebDav extends StorageBase {
headers: { headers: {
Destination: encodeURI(movePath), Destination: encodeURI(movePath),
'Overwrite': 'T' 'Overwrite': 'T'
}, }
...saveOpts
}, },
err => { err => {
if (err) { if (err) {
@ -192,9 +192,9 @@ class StorageWebDav extends StorageBase {
} }
that._request( that._request(
{ {
...saveOpts,
op: 'Save:stat', op: 'Save:stat',
method: 'HEAD', method: 'HEAD'
...saveOpts
}, },
(err, xhr, stat) => { (err, xhr, stat) => {
cb(err, xhr, stat); cb(err, xhr, stat);
@ -209,11 +209,11 @@ class StorageWebDav extends StorageBase {
} else { } else {
that._request( that._request(
{ {
...saveOpts,
op: 'Save:put', op: 'Save:put',
method: 'PUT', method: 'PUT',
data, data,
nostat: true, nostat: true
...saveOpts
}, },
err => { err => {
if (err) { if (err) {
@ -221,9 +221,9 @@ class StorageWebDav extends StorageBase {
} }
that._request( that._request(
{ {
...saveOpts,
op: 'Save:stat', op: 'Save:stat',
method: 'HEAD', method: 'HEAD'
...saveOpts
}, },
(err, xhr, stat) => { (err, xhr, stat) => {
cb(err, xhr, stat); cb(err, xhr, stat);

View File

@ -1,5 +1,8 @@
Release notes Release notes
------------- -------------
##### v1.11.10 (2019-10-15)
`-` fix #1305: WebDAV issues
##### v1.11.9 (2019-10-13) ##### v1.11.9 (2019-10-13)
`-` fix #1300: selecting auto-type sequence items issues `-` fix #1300: selecting auto-type sequence items issues
`-` fix #1290: generator popup positioning in custom themes `-` fix #1290: generator popup positioning in custom themes