You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by mj...@apache.org on 2018/01/14 02:52:36 UTC

[1/2] guacamole-client git commit: GUACAMOLE-347: Fix issue with IE missing window.location.origin

Repository: guacamole-client
Updated Branches:
  refs/heads/master 00d464b51 -> 656328149


GUACAMOLE-347: Fix issue with IE missing window.location.origin


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/6f751702
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/6f751702
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/6f751702

Branch: refs/heads/master
Commit: 6f7517028ef2de52a204d00be9cb346260b48fdd
Parents: 0611fe8
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Oct 31 13:33:00 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Oct 31 13:33:00 2017 -0400

----------------------------------------------------------------------
 .../main/webapp/app/rest/services/tunnelService.js  | 16 ++++++++++++++--
 .../main/webapp/app/rest/types/UserCredentials.js   |  8 +++++++-
 2 files changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6f751702/guacamole/src/main/webapp/app/rest/services/tunnelService.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/rest/services/tunnelService.js b/guacamole/src/main/webapp/app/rest/services/tunnelService.js
index f74088d..6a4840c 100644
--- a/guacamole/src/main/webapp/app/rest/services/tunnelService.js
+++ b/guacamole/src/main/webapp/app/rest/services/tunnelService.js
@@ -189,8 +189,14 @@ angular.module('rest').factory('tunnelService', ['$injector',
      */
     service.downloadStream = function downloadStream(tunnel, stream, mimetype, filename) {
 
+        // Work-around for IE missing window.location.origin
+        if (!$window.location.origin)
+            var streamOrigin = $window.location.protocol + '//' + $window.location.hostname + ($window.location.port ? (':' + $window.location.port) : '');
+        else
+            var streamOrigin = $window.location.origin;
+
         // Build download URL
-        var url = $window.location.origin
+        var url = streamOrigin
                 + $window.location.pathname
                 + 'api/session/tunnels/' + encodeURIComponent(tunnel)
                 + '/streams/' + encodeURIComponent(stream.index)
@@ -267,8 +273,14 @@ angular.module('rest').factory('tunnelService', ['$injector',
 
         var deferred = $q.defer();
 
+        // Work-around for IE missing window.location.origin
+        if (!$window.location.origin)
+            var streamOrigin = $window.location.protocol + '//' + $window.location.hostname + ($window.location.port ? (':' + $window.location.port) : '');
+        else
+            var streamOrigin = $window.location.origin;
+
         // Build upload URL
-        var url = $window.location.origin
+        var url = streamOrigin
                 + $window.location.pathname
                 + 'api/session/tunnels/' + encodeURIComponent(tunnel)
                 + '/streams/' + encodeURIComponent(stream.index)

http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/6f751702/guacamole/src/main/webapp/app/rest/types/UserCredentials.js
----------------------------------------------------------------------
diff --git a/guacamole/src/main/webapp/app/rest/types/UserCredentials.js b/guacamole/src/main/webapp/app/rest/types/UserCredentials.js
index ddf9eaf..dc6c75e 100644
--- a/guacamole/src/main/webapp/app/rest/types/UserCredentials.js
+++ b/guacamole/src/main/webapp/app/rest/types/UserCredentials.js
@@ -114,8 +114,14 @@ angular.module('rest').factory('UserCredentials', ['$injector', function defineU
      */
     UserCredentials.getLink = function getLink(userCredentials) {
 
+        // Work-around for IE missing window.location.origin
+        if (!$window.location.origin)
+            var linkOrigin = $window.location.protocol + '//' + $window.location.hostname + ($window.location.port ? (':' + $window.location.port) : '');
+        else
+            var linkOrigin = $window.location.origin;
+
         // Build base link
-        var link = $window.location.origin
+        var link = linkOrigin
                  + $window.location.pathname
                  + '#/';
 


[2/2] guacamole-client git commit: GUACAMOLE-347: Merge fix for IE lack of window.location.origin.

Posted by mj...@apache.org.
GUACAMOLE-347: Merge fix for IE lack of window.location.origin.


Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/65632814
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/65632814
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/65632814

Branch: refs/heads/master
Commit: 6563281496e38956807860b23c9c45f447dfe2db
Parents: 00d464b 6f75170
Author: Michael Jumper <mj...@apache.org>
Authored: Sat Jan 13 18:50:11 2018 -0800
Committer: Michael Jumper <mj...@apache.org>
Committed: Sat Jan 13 18:50:11 2018 -0800

----------------------------------------------------------------------
 .../main/webapp/app/rest/services/tunnelService.js  | 16 ++++++++++++++--
 .../main/webapp/app/rest/types/UserCredentials.js   |  8 +++++++-
 2 files changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------