shindig-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ali Hamdi (JIRA)" <>
Subject [jira] Created: (SHINDIG-1250) Proxy URL is not correct when using Shindig in an SSL environment
Date Tue, 22 Dec 2009 14:54:31 GMT
Proxy URL is not correct when using Shindig in an SSL environment

                 Key: SHINDIG-1250
             Project: Shindig
          Issue Type: Bug
          Components: Javascript 
         Environment: Shindig 0.8.1-1-r719456
            Reporter: Ali Hamdi

I configured my Tomcat to use SSL environment.(HTTPS)
I have an RSS gadget which gets contents from external feeds.
When debugging, I found that the proxy URl was incorrect in file *shindig-features-0.8.1-1-r719456/features/*

proxyUrl=http://localhost:8443/GadgetServer which contains http instead of https and that
returned me this error 
'Access to restricted URI denied" code: "1012'
The origin of this error was :
function makeXhrRequest(realUrl, proxyUrl, callback, paramData, method,
      params, processResponseFunction, opt_contentType) {
    var xhr = makeXhr();, proxyUrl, true);// this code generates the exception
    if (callback) {
      xhr.onreadystatechange = gadgets.util.makeClosure(
          null, processResponseFunction, realUrl, callback, params, xhr);
    if (paramData != null) {
      xhr.setRequestHeader('Content-Type', opt_contentType || 'application/x-www-form-urlencoded');
    } else {

I fixed it by adding this code which find out which HTTP protocol is used to generate the
right HTTP request in *makeRequest* function:
makeRequest : function (url, callback, opt_params) {
      // TODO: This method also needs to respect all members of
      //, and validate them.

      var params = opt_params || {};

      var httpMethod = params.METHOD || "GET";
      var refreshInterval = params.REFRESH_INTERVAL;


      var proxyUrl = config.jsonProxyUrl.replace("http:", document.location.protocol).replace("%host%",;//the line was fixed this way 
// it will be better to use replace("%protocol%", document.location.protocol) and add %protocol%
to the proxyUrl template

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

View raw message