| Summary: | <condition/> is ignored in RewriteValve | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Hisanobu Okuda <hokuda> |
| Component: | Web | Assignee: | Rémy Maucherat <rmaucher> |
| Status: | CLOSED DUPLICATE | QA Contact: | Radim Hatlapatka <rhatlapa> |
| Severity: | unspecified | Docs Contact: | Russell Dickenson <rdickens> |
| Priority: | unspecified | ||
| Version: | 6.1.0 | CC: | mmiura |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-08-23 07:35:24 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: | |
The below works for me:-
[hokuda@localhost 00911259]$ diff -u WebVirtualHostAdd.java.org WebVirtualHostAdd.java
--- WebVirtualHostAdd.java.org 2013-05-09 13:06:56.000000000 +0900
+++ WebVirtualHostAdd.java 2013-08-23 11:58:05.330030629 +0900
@@ -163,13 +163,13 @@
ModelNode result = new ModelNode();
for (Property prop : unresolvedRewriteChildren.asPropertyList()) {
ModelNode resolvedParent = resolveExpressions(context, prop.getValue(), WebReWriteDefinition.ATTRIBUTES);
- result.get(prop.getName()).set(resolvedParent);
if (prop.getValue().hasDefined(Constants.CONDITION)) {
for (Property conditionProp : prop.getValue().get(Constants.CONDITION).asPropertyList()) {
ModelNode resolvedCondition = resolveExpressions(context, conditionProp.getValue(), WebReWriteConditionDefinit
ion.ATTRIBUTES);
resolvedParent.get(Constants.CONDITION, conditionProp.getName()).set(resolvedCondition);
}
}
+ result.get(prop.getName()).set(resolvedParent);
}
return result;
}
[hokuda@localhost 00911259]$
Request for inclusion to EAP 6.2.0 Is this BZ duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=969547 ? *** This bug has been marked as a duplicate of bug 969547 *** Removing flags |
Description of problem: I configured web subsystem as follow:- <subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false"> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost"/> <alias name="example.com"/> <access-log> <directory relative-to="jboss.server.log.dir"/> </access-log> <rewrite pattern=".*" substitution="-" flags="F"> <condition test="%{REQUEST_METHOD}" pattern="OPTIONS" flags="NC" /> </rewrite> But <condition/> is ignored, as a result, EAP returns 403 for any HTTP mothods. Version-Release number of selected component (if applicable): EAP 6.1.0 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: EAP should return 403 for any methods (e.g., POST/GET/PUT/DELETE/TRACE/OPTIONS). Expected results: EAP should return 403 for OPTIONS method, and 200 for POST/GET methods. Additional info: