]> source.dussan.org Git - nextcloud-server.git/commitdiff
Small fixes in Dav files client
authorVincent Petry <pvince81@owncloud.com>
Thu, 4 Feb 2016 14:38:54 +0000 (15:38 +0100)
committerVincent Petry <pvince81@owncloud.com>
Thu, 4 Feb 2016 14:38:54 +0000 (15:38 +0100)
Remove double leading slash in path.
Add utf-8 in default content type.

core/js/files/client.js

index 3d31f974ff81c65e0d9911c7386b9a94ad0f002f..b736447d65e76c0211f415128e4f055b0fce0d13 100644 (file)
                                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;
                        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;
                        }