You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Paul Lindner (JIRA)" <ji...@apache.org> on 2009/04/18 02:38:14 UTC

[jira] Created: (SHINDIG-1022) Use separate domain names for iframes on sample container

Use separate domain names for iframes on sample container
---------------------------------------------------------

                 Key: SHINDIG-1022
                 URL: https://issues.apache.org/jira/browse/SHINDIG-1022
             Project: Shindig
          Issue Type: Improvement
          Components: Javascript 
    Affects Versions: trunk
            Reporter: Paul Lindner
            Assignee: Paul Lindner


When using the sample container we really don't test the RPC mechanisms.  This is because the generated iframe is on the same domain as the container.  This can cause bugs because regular RPC mechanisms serialize the javascript objects whereas same-domain calls just pass a reference.  For samplecontainer we can use localhost for the container and 127.0.0.1 for the iframe to enact this testing.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-1022) Use separate domain names for iframes on sample container

Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700396#action_12700396 ] 

Paul Lindner commented on SHINDIG-1022:
---------------------------------------

Here's a simple fix..  Anyone think it can be done better?

Index: javascript/samplecontainer/samplecontainer.js
===================================================================
--- javascript/samplecontainer/samplecontainer.js       (revision 765858)
+++ javascript/samplecontainer/samplecontainer.js       (working copy)
@@ -150,7 +150,10 @@
     for (var i = 0; i < metadata.gadgets.length; i++) {
       gadget = gadgets.container.createGadget(
           {'specUrl': metadata.gadgets[i].url, 'title': metadata.gadgets[i].title});
-      gadget.setServerBase('../../');
+      // replace localhost with 127.0.0.1 to simulate cross-domain
+      var iframeBaseUrl = baseUrl.replace("localhost", "127.0.0.1") + '../../';
+
+      gadget.setServerBase(iframeBaseUrl);
       gadget.secureToken = escape(generateSecureToken());
       gadgets.container.addGadget(gadget);
     }


> Use separate domain names for iframes on sample container
> ---------------------------------------------------------
>
>                 Key: SHINDIG-1022
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1022
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Javascript 
>    Affects Versions: trunk
>            Reporter: Paul Lindner
>            Assignee: Paul Lindner
>
> When using the sample container we really don't test the RPC mechanisms.  This is because the generated iframe is on the same domain as the container.  This can cause bugs because regular RPC mechanisms serialize the javascript objects whereas same-domain calls just pass a reference.  For samplecontainer we can use localhost for the container and 127.0.0.1 for the iframe to enact this testing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SHINDIG-1022) Use separate domain names for iframes on sample container

Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Lindner resolved SHINDIG-1022.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: trunk

checked into trunk..


> Use separate domain names for iframes on sample container
> ---------------------------------------------------------
>
>                 Key: SHINDIG-1022
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1022
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Javascript 
>    Affects Versions: trunk
>            Reporter: Paul Lindner
>            Assignee: Paul Lindner
>             Fix For: trunk
>
>
> When using the sample container we really don't test the RPC mechanisms.  This is because the generated iframe is on the same domain as the container.  This can cause bugs because regular RPC mechanisms serialize the javascript objects whereas same-domain calls just pass a reference.  For samplecontainer we can use localhost for the container and 127.0.0.1 for the iframe to enact this testing.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.