Small fixes in Dav files client

Remove double leading slash in path.
Add utf-8 in default content type.
This commit is contained in:
Vincent Petry 2016-02-04 15:38:54 +01:00
parent 899444103a
commit 8782004742
1 changed files with 2 additions and 2 deletions

View File

@ -239,7 +239,7 @@
path = path.substr(0, path.length - 1);
}
path = '/' + decodeURIComponent(path);
path = decodeURIComponent(path);
if (response.propStat.length === 1 && response.propStat[0].status !== 200) {
return null;
@ -505,7 +505,7 @@
var promise = deferred.promise();
options = options || {};
var headers = _.extend({}, this._defaultHeaders);
var contentType = 'text/plain';
var contentType = 'text/plain;charset=utf-8';
if (options.contentType) {
contentType = options.contentType;
}