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

Chris Chabot commented on SHINDIG-427:
--------------------------------------

There are 2 test gadgets in 
shindig/javascript/samplecontainer/examples/rewriter{on,off}.xml.

When i try the rewriteron.xml i see that :

<style type="text/css"> @import url( rewriter1.css ); </style>
is rewritten too:
<style type="text/css"> @import url( rewriter1.css ); </style>

aka no changes, while it should be rewritten.

<link rel="stylesheet" type="text/css" href="rewriter2.css"/>
is rewritten too:
<link rel="stylesheet" type="text/css" 
href="/gadgets/proxy?url=%2Fgadgets%2Fproxy%3Furl%3Drewriter2.css"/>

In this case the base URL of the gadget 
(http://shindig/gadgets/files/samplecontainer/examples/rewriter/ in my case) 
should be prefixed before the URL. However it seems to have changed it too 
/gadgets/proxy?url=rewriter2.css ?

It should've been:
href="/gadgets/proxy?url=http://shindig/gadgets/files/samplecontainer/examples/rewriter/rewriter2.css";


In the same spirit:
<img id="rewriteimg" src="feather.png"
is rewritten too:
<img id="rewriteimg" 
src="/gadgets/proxy?url=%2Fgadgets%2Fproxy%3Furl%3Dfeather.png"

but should've been:
src="/gadgets/proxy?url=http://shindig/gadgets/files/samplecontainer/examples/rewriter/feather.png";

And that goes for the rest of the tags in the rewriteron.xml too.


Interestingly enough, in the rewriteroff.xml gadget 
<style type="text/css"> @import url( 
http://shindig/gadgets/files/samplecontainer/examples/rewriter/rewriter1.css ); 
</style>
is untouched (as it should be since the gadget has <Param 
name="exclude-urls">.*</Param>)

However:
<link rel="stylesheet" type="text/css" 
href="http://shindig/gadgets/files/samplecontainer/examples/rewriter/rewriter2.css"/>
was turned into:
<link rel="stylesheet" type="text/css" 
href="/gadgets/proxy?url=http%3A%2F%2Fshindig%2Fgadgets%2Ffiles%2Fsamplecontainer%2Fexamples%2Frewriter%2Frewriter2.css"/>

Which is really interesting, since exclude url's is set to .* aka all ! :)

Also
<img id="rewriteimg" src="feather.png" 
is rewritten (while it shouldn't rewrite anything) to:
<img id="rewriteimg" src="/gadgets/proxy?url=feather.png"

but
<script type="text/javascript" 
src="http://shindig/gadgets/files/samplecontainer/examples/rewriter/rewriter1.js";>
is un-touched again.

Seems as it is, the patch isn't ready to be committed yet. Could you please 
take a look at these issues? 

Thanks!

> Content-Rewrite
> ---------------
>
>                 Key: SHINDIG-427
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-427
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Gadget Rendering Server (PHP)
>            Reporter: Jorge Condomí
>         Attachments: content-rewrite-feature.patch
>
>
> Add the Content-Rewrite feature to the Gadget Rendering Servlet and the Proxy 
> servlet
> http://orkutdeveloper.blogspot.com/2008/06/rewriting-returns-to-sandbox.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