shindig-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohamed IBN ELAZZOUZI <mohamed.ibnelazzo...@gmail.com>
Subject Re: Shindig Content/URLs rewrite
Date Sun, 13 Mar 2011 12:06:48 GMT
I found the solution,
i replaced http://myhost/toto by http://myhost/toto/ and all works fine.
Regards.

2011/3/9 Mohamed IBN ELAZZOUZI <mohamed.ibnelazzouzi@gmail.com>

> 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:
> /toto/javascript/common.js"></script>
> 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) +
> relativePath));
> 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.
> Mohamed.
>

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