[jboss-jira] [JBoss JIRA] Reopened: (JBWEB-67) Patch to fix usabillity issues with the rewrite valve

Rob Hughes (JIRA) jira-events at jboss.com
Mon Aug 7 11:26:12 EDT 2006


     [ http://jira.jboss.com/jira/browse/JBWEB-67?page=all ]

Rob Hughes reopened JBWEB-67:
-----------------------------

             
I disagree about number 4.  Mod_rewrite doesn't force a full match of the input to the pattern.  Being familiar with mod_rewrite it took searching the source to find out why the following set wouldn't work with the rewrite valve but does with mod_rewrite.

# input url http://someurl.com/page.html?name=about&test=param
# change /page.html?name=page_name to /pages/page_name.html
RewriteCond  %{QUERY_STRING}  name=([^&;]*)
RewriteRule  ^/page\.html  /pages/%1.html?  [L,R=301]

Considering that the input and documentation are almost identical to the mod_rewrite stuff I would ask that you put number 4 in to maintain a consistent behavior between the two and to fall more inline with what users would expect.

> Patch to fix usabillity issues with the rewrite valve
> -----------------------------------------------------
>
>                 Key: JBWEB-67
>                 URL: http://jira.jboss.com/jira/browse/JBWEB-67
>             Project: JBoss Web
>          Issue Type: Patch
>      Security Level: Public(Everyone can see) 
>          Components: Rewrite Valve
>    Affects Versions: JBoss Web Server 1.0.0 GA
>            Reporter: Rob Hughes
>         Assigned To: Remy Maucherat
>             Fix For: JBoss Web Server 1.0.0 GA
>
>         Attachments: rewrite_valve.patch
>
>
> I'm providing this patch which fixes the following issues with the rewrite valve and makes it's behavior more consistent with mod_rewrite.
> 1: Rewrite conditions were not being processed
> 2: Case insensitive pattern matches were not working
> 3: Send redirect with an arbitrary code now works and uses reflection to see if the method is available so the valve will still work with standalone tomcat
> 4: Patterns are no longer forced to match the whole input for conditions and rules
> 5: The server variable HTTP_HOST included the port if the server wasn't running on the standard ones (80/443)
> 6: QSA is how handled and query strings are appended where appropriate
> 7: Comments are now allowed in the rewrite.properties file
> The patch is against the jbossweb trunk.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list