[ 
https://issues.apache.org/jira/browse/SHINDIG-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733839#action_12733839
 ] 

Chris Chabot commented on SHINDIG-1123:
---------------------------------------

Hmm that is odd, when you look at the iframe source you'll see the preloaded 
data is being injected:

gadgets.io.preloaded_ = 
{"http:\/\/social-app-tutorial.appspot.com\/static\/hello.html":{"body":"Hello, 
proxied <b>profile<\/b> view!","rc":200}};
</script>

Which used to mean that a makeRequest would use that instead of fetching it 
a-fresh. No idea what changed in the meantime but I'll follow up on it. 

Thanks for the report

> makeRequest not using preloaded data
> ------------------------------------
>
>                 Key: SHINDIG-1123
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1123
>             Project: Shindig
>          Issue Type: Bug
>          Components: PHP
>         Environment: shindig (PHP) trunk
>            Reporter: Matthieu Huguet
>
> Hi,
> It seems that makeRequest is not using preloaded data : request are executed 
> 2 times !
> Here is simple a test gadget  (it preloads a page and call makeRequest to 
> load the same page).
> <?xml version="1.0" encoding="UTF-8"?>
> <Module>
>   <ModulePrefs title="Preload test">
>     <Preload href="http://social-app-tutorial.appspot.com/static/hello.html";
>            views="home" />
>   </ModulePrefs>
>   <Content view="home" type="html">
>     <![CDATA[
>     <script type="text/javascript">
>       var params = {};
>       
> gadgets.io.makeRequest('http://social-app-tutorial.appspot.com/static/hello.html',
>  function(r){}, params);
>     </script>
>     ]]>
>   </Content>
> </Module>
> To reproduce :
> 1) Put some debug in your BasicRemoteContentFetcher::fetchRequest() and 
> BasicRemoteContentFetcher::multiFetchRequest()
> 2) Empty your shindig cache
>     [ http://social-app-tutorial.appspot.com/static/hello.html  is cached 10 
> minutes (See expires/cache-control headers) ]
> 3) Render the gadget
> Result :
> [2009-07-21T15:08:15+00:00] [DEBUG] [default]: multiFetchRequest : 
> http://social-app-tutorial.appspot.com/static/hello.html
> [2009-07-21T15:08:15+00:00] [DEBUG] [default]: fetchRequest : 
> http://social-app-tutorial.appspot.com/static/hello.html

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

Reply via email to