diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-02-16 17:28:35 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-02-16 17:37:12 +0100 |
commit | 5575443be96e2a8b9b966fad6e3191f2c0d96740 (patch) | |
tree | e1cab4659d203ca8b50e2f4ef73e490cdd59b04b | |
parent | 273fb758247fd8f3c6a54fec1f773d2a0cd5ff20 (diff) | |
download | nextcloud-server-5575443be96e2a8b9b966fad6e3191f2c0d96740.tar.gz nextcloud-server-5575443be96e2a8b9b966fad6e3191f2c0d96740.zip |
Fix redundant headers in files dav client
The defaultHeaders are already injected with the xhrProvider, so no need
to pass them again a second time.
-rw-r--r-- | core/js/files/client.js | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/core/js/files/client.js b/core/js/files/client.js index 55a8e2c485a..627630e8b03 100644 --- a/core/js/files/client.js +++ b/core/js/files/client.js @@ -394,7 +394,6 @@ properties = options.properties; } - // TODO: headers this._client.propFind( this._buildUrl(path), properties, @@ -441,7 +440,6 @@ throw 'Missing filter argument'; } - var headers = _.extend({}, this._defaultHeaders); // root element with namespaces var body = '<oc:filter-files '; var namespace; @@ -472,7 +470,7 @@ this._client.request( 'REPORT', this._buildUrl(), - headers, + {}, body ).then(function(result) { if (self._isSuccessStatus(result.status)) { @@ -542,8 +540,7 @@ this._client.request( 'GET', - this._buildUrl(path), - this._defaultHeaders + this._buildUrl(path) ).then( function(result) { if (self._isSuccessStatus(result.status)) { @@ -575,7 +572,7 @@ var deferred = $.Deferred(); var promise = deferred.promise(); options = options || {}; - var headers = _.extend({}, this._defaultHeaders); + var headers = {}; var contentType = 'text/plain;charset=utf-8'; if (options.contentType) { contentType = options.contentType; @@ -616,8 +613,7 @@ this._client.request( method, - this._buildUrl(path), - this._defaultHeaders + this._buildUrl(path) ).then( function(result) { if (self._isSuccessStatus(result.status)) { @@ -673,10 +669,9 @@ var self = this; var deferred = $.Deferred(); var promise = deferred.promise(); - var headers = - _.extend({ - 'Destination' : this._buildUrl(destinationPath) - }, this._defaultHeaders); + var headers = { + 'Destination' : this._buildUrl(destinationPath) + }; if (!allowOverwrite) { headers['Overwrite'] = 'F'; |