[ 
https://issues.apache.org/jira/browse/SLING-12405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872310#comment-17872310
 ] 

Henry Kuijpers commented on SLING-12405:
----------------------------------------

I do not see it working with a forward and existing target.

Which makes sense:
 * Request filters execute
 * RequestDispatcher#forward is called (and not FilterChain#doFilter)
 * Forward filters are called
 * Rewriter filter is not called (as it is not a forward filter)

Vs
 * Request filters execute
 * Sub-requests occur (includes etc)
 ** RequestDispatcher#forward is called (in a sub-request)
 ** Forward filters are called
 ** Rewriter filter is not called (as it is not a forward filter)
 * Rewriter filter is called (as it is a request filter)

 

So the moment this issue occurs, is when the request filter chain is not 
proceeded (i.e. by redirecting / forwarding and thus not calling 
FilterChain#doFilter).

> Rewriter Filter not called when request is forwarded
> ----------------------------------------------------
>
>                 Key: SLING-12405
>                 URL: https://issues.apache.org/jira/browse/SLING-12405
>             Project: Sling
>          Issue Type: Bug
>    Affects Versions: Rewriter 1.4.4
>            Reporter: Henry Kuijpers
>            Priority: Major
>
> See also SLING-1140, where actually in the description is written that 
> "RequestDispatcher#forward" results in the rewriter not being called. The fix 
> there was to add "error" to the filter as well. But it seems that, by using 
> "forward", to a resource that does exist, in fact does not trigger the 
> rewriting pipeline (and thus the same issue occurs).
> Some use cases:
>  * AEM's link checker / externalizer is not being called, so the resulting 
> page will have long links (including /content), instead of short links
>  * ACS AEM Commons versioned clientlibs transformer will not be called, so 
> the MD5 hashes will not be appended to the URL



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to