shindig-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohamed IBN ELAZZOUZI <>
Subject Shindig Content/URLs rewrite
Date Wed, 09 Mar 2011 20:52:11 GMT
Hi all,
I'm trying to add my own content rewriter with shindig.
My use case is :
rewrite web content urls before rendering it.
with relatives path like <script type="text/javascript"
language="JavaScript" src="javascript/common.js"></script> i want to
get <script
type="text/javascript" language="JavaScript" src="http://myhost:
and the base url (http://myhost:/toto) is the url attribute of my gadget
content in the gadget.xml
In my code, i can retrieve it, nice, but the problem is when i want to get
my url (http://myhost:/toto/javascript/common.js) the (/toto) is deleted.
I found the problem in the org.apache.shindig.common.uri.Uri class when i
call the org.apache.shindig.common.uri.Uri.resolve(Uri) method :
 String basePath = path != null ? path : "/";
 int endindex = basePath.lastIndexOf('/') + 1;
 result.setPath(normalizePath(basePath.substring(0, endindex) +
So the path (/toto) is replaced by the new path (javascript/common.js)
Should i keep these instructions or is it a bug?
Thank you for advance.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message