{
String urlAsString = currentMatch.getURLAsString();
ProducerInfo info = consumer.getProducerInfo();
if (urlAsString.startsWith(WSRPRewritingConstants.BEGIN_WSRP_REWRITE))
{
WSRPPortletURL portletURL = WSRPPortletURL.create(urlAsString,
info.getSupportedCustomModes(), info.getSupportedCustomWindowStates());
if (portletURL instanceof WSRPResourceURL)
{
log.debug("URL '" + urlAsString + "' seems to refer to a resource which are not currently supported. " +
"Trying to use the raw URL but this probably won't work...");
return portletURL.toString();
}
// todo: this is a hack to circumvent frameworks that don't properly request resource encoding (icefaces)
if (urlAsString.startsWith(SLASH))
{