Bug 63002 - QSD in RewriteRule doesn't work
Summary: QSD in RewriteRule doesn't work
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 8.5.35
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-11 10:48 UTC by Melvin A
Modified: 2018-12-11 11:58 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Melvin A 2018-12-11 10:48:42 UTC
Hi there, 

QSD flag added to any RewriteRule doesn't work. 

RewriteRule ^/app1/(.*)$ /app1/rewrite.jsp [L,QSD]

this is my only line in rewrite.config, When I give http://localhost:8080/app1/test.jsp?value=single as the request, the ideal behaviour must discard the querystring and go to rewrite.jsp.

But it doesn't and I found the cause. Hope 1845673 is the revision of tomcat 8.5.35. In java/org/apache/catalina/valves/rewrite/RewriteValve.java line 785, rule is set for qsAppend instead of qsDiscard. Do the needful.

Regards,

Melvin A
Comment 1 Remy Maucherat 2018-12-11 11:58:56 UTC
Bad cut & paste ... The fix will be in 9.0.14 and 8.5.36.