summaryrefslogtreecommitdiffstats
path: root/core/js/files
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-17 13:37:13 +0100
committerLukas Reschke <lukas@owncloud.com>2015-11-22 16:05:51 +0100
commitab1d786d879d519c86cd2016490d1ade5e43fd41 (patch)
treed01b0f4fda22fe10f0a007a776eec93e08bcfa3e /core/js/files
parent240ae46265c9bae2b1943d34dfe7b708d06c247a (diff)
downloadnextcloud-server-ab1d786d879d519c86cd2016490d1ade5e43fd41.tar.gz
nextcloud-server-ab1d786d879d519c86cd2016490d1ade5e43fd41.zip
Fix port issue - options.host already has the port attached
Diffstat (limited to 'core/js/files')
-rw-r--r--core/js/files/client.js19
1 files changed, 3 insertions, 16 deletions
diff --git a/core/js/files/client.js b/core/js/files/client.js
index 5ee90d2d52e..07a7132d4be 100644
--- a/core/js/files/client.js
+++ b/core/js/files/client.js
@@ -31,22 +31,9 @@
this._root = this._root.substr(0, this._root.length - 1);
}
- if (!options.port) {
- // workaround in case port is null or empty
- options.port = undefined;
- }
- var url = '';
- var port = '';
+ var url = 'http://';
if (options.useHTTPS) {
- url += 'https://';
- if (options.port && options.port !== 443) {
- port = ':' + options.port;
- }
- } else {
- url += 'http://';
- if (options.port && options.port !== 80) {
- port = ':' + options.port;
- }
+ url = 'https://';
}
var credentials = '';
if (options.userName) {
@@ -59,7 +46,7 @@
url += credentials + '@';
}
- url += options.host + port + this._root;
+ url += options.host + this._root;
this._defaultHeaders = options.defaultHeaders || {'X-Requested-With': 'XMLHttpRequest'};
this._baseUrl = url;
this._client = new dav.Client({