Bug 64432

Summary: RewriteValve does not work with multiple rules
Product: Tomcat 9 Reporter: Jj! <jj>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: apache-bugzilla=spam, melvindoss
Priority: P2    
Version: unspecified   
Target Milestone: -----   
Hardware: PC   
OS: All   
Attachments: patch with simple tests and potential fix

Description Jj! 2020-05-13 17:09:50 UTC
Created attachment 37241 [details]
patch with simple tests and potential fix

When a multiline configuration file is used for RewriteValve is used, only the first rule is ever run/applied. Attached is a patch for a couple simple test cases, and a potential fix.

This problem is exhibited in master and the 8.5.x branch.

I'm not sure of the fuller impact of the fix since this reverts recent changes in the code.
Comment 1 Mark Thomas 2020-05-14 09:12:10 UTC
Fixed. Thanks for the report and the test cases.

Fixed in:
- master for 10.0.0-M6 onwards
- 9.0.x for 9.0.36 onwards
- 8.5.x for 8.5.56 onwards
Comment 2 Mark Thomas 2020-05-20 13:07:56 UTC
*** Bug 64461 has been marked as a duplicate of this bug. ***
Comment 3 Felix Schumacher 2020-06-04 04:53:48 UTC
*** Bug 64495 has been marked as a duplicate of this bug. ***