You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by "Nick Couchman (JIRA)" <ji...@apache.org> on 2017/11/19 23:13:00 UTC

[jira] [Assigned] (GUACAMOLE-347) IE may lack window.location.origin

     [ https://issues.apache.org/jira/browse/GUACAMOLE-347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Couchman reassigned GUACAMOLE-347:
---------------------------------------

    Assignee: Nick Couchman

> IE may lack window.location.origin
> ----------------------------------
>
>                 Key: GUACAMOLE-347
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-347
>             Project: Guacamole
>          Issue Type: Bug
>    Affects Versions: 0.9.10-incubating, 0.9.11-incubating, 0.9.12-incubating
>            Reporter: Michael Jumper
>            Assignee: Nick Couchman
>
> From GUACAMOLE-327:
> {quote}
> Internet Explorer, including 11, doesn't have support for location.origin so when trying to build the URL for the XMLHttpRequests in tunnelService.downloadStream and tunnelService.uploadToStream, the string "undefined" gets prepended onto the URL, rendering that functionality unusable.
> The workaround/polyfill for this is pretty simple and well documented on the web and is basically:
> {code:javascript}
> if (!window.location.origin) {
>   window.location.origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? (':' + window.location.port) : '');
> }
> {code}
> {quote}
> In addition to the above, there are other locations within the Guacamole web application which use {{window.location.origin}} which will need to be corrected. In particular:
> * Reformatting of query parameters for AngularJS
> * Generation of share links
> * Generation of download/upload URLs for streams



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)