Skip to content

Commit

Permalink
Small fixes in Dav files client
Browse files Browse the repository at this point in the history
Remove double leading slash in path.
Add utf-8 in default content type.
  • Loading branch information
Vincent Petry committed Feb 4, 2016
1 parent 8994441 commit 8782004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/js/files/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 8782004

Please sign in to comment.