Issue 38 in urlrewritefilter: <to encode="true"> should apply to forwards

0 views
Skip to first unread message

codesite...@google.com

unread,
May 26, 2009, 8:13:51 PM5/26/09
to urlre...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 38 by a...@carbonfive.com: <to encode="true"> should apply to
forwards
http://code.google.com/p/urlrewritefilter/issues/detail?id=38

I am rewriting URLs to images that have spaces in their names. Something
like:

<rule>
<from>^/img/(.*)$</from>
<to>/images/$1</to>
</rule>

The images themselves are being served by the container (Tomcat 6). When
image names have spaces in them, Tomcat reports a 404 because the to URL is
not being encoded and has a space in the name.

Changing this to <to encode="true"> has no effect because
NormalRewrittenUrl.doRewrite() does not encode forwards, only redirects.

I believe this is a bug in NormalRewrittenUrl as these forwards will always
fail for URLs that require reencoding.

I looked in to writing a test for this but the 3.2.0 test suite is failing
for me on clean checkout and I didn't want to get in to figuring out what
was going on there.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply all
Reply to author
Forward
0 new messages