Bug 1318006

Summary: [GSS](6.4.z) Rewrite file ResourceConditions always return true
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Aaron Ogburn <aogburn>
Component: WebAssignee: Chao Wang <chaowan>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hatlapatka <rhatlapa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.6CC: bbaranow, bmaxwell, chaowan, jtruhlar, mcada, rmaucher
Target Milestone: CR1   
Target Release: EAP 6.4.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 12:36:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1279553, 1313271    

Description Aaron Ogburn 2016-03-15 18:14:03 UTC
Description of problem:

The -d, -f, -s rewrite valve file tests do not work.  The ResourceCondition is simply coded to always return true.

Version-Release number of selected component (if applicable):

7.5.12


How reproducible:

Always


Steps to Reproduce:
1.Configure a rewrite valve that's conditioned with -s:

<rewrite name="rule-1" pattern="^/app/(.*)" substitution="/app/redirect.jsp" flags="RL">
    <condition name="condition-1" test="%{REQUEST_PATH}" pattern="!-s"/>
</rewrite>

2. Note that this redirects all requests, but it should only redirect requests to non-existent files.


Actual results:

ResourceCondition always returns true.


Expected results:

ResourceCondition only returns true as expected if the file exists.


Additional info:

Comment 3 Mike McCune 2016-03-28 22:24:40 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 4 Rémy Maucherat 2016-03-29 13:45:06 UTC
r2649, for some reason it wasn't ported earlier from Tomcat.

Comment 7 Michael Cada 2016-05-11 13:38:21 UTC
Verified with EAP 6.4.8.CP.CR2

Comment 8 Petr Penicka 2017-01-17 12:36:05 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.