[jboss-jira] [JBoss JIRA] Updated: (JBWEB-157) NPE in TomcatResolver for client-requests without a Host-Header when a HTTP_HOST-RewriteCond is configured.
Markus Grieder (JIRA)
jira-events at lists.jboss.org
Sat Jan 9 06:17:30 EST 2010
[ https://jira.jboss.org/jira/browse/JBWEB-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Markus Grieder updated JBWEB-157:
---------------------------------
Attachment: tomcatresolver.patch
Patch
> NPE in TomcatResolver for client-requests without a Host-Header when a HTTP_HOST-RewriteCond is configured.
> -----------------------------------------------------------------------------------------------------------
>
> Key: JBWEB-157
> URL: https://jira.jboss.org/jira/browse/JBWEB-157
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Rewrite Valve
> Affects Versions: JBossWeb-2.1.3.GA
> Environment: JBoss 5.1.0.GA, Linux, SUN JDK 1.6.0_16
> Reporter: Markus Grieder
> Assignee: Remy Maucherat
> Attachments: tomcatresolver.patch
>
>
> Using the following RewriteValve-configuration and do a HTTP-request without a Host-Header generates a NPE (Some old HTTP1.0-clients and bots don't provide a Host-Header).
> --------------------------
> RewriteCond %{HTTP_HOST} www.domain.invalid
> RewriteRule .* - [F]
> --------------------------
> I reproduced this in JBossWeb2.1.3, but the bug is not yet fixed in trunk.
> Stacktrace:
> 2010-01-08 16:26:27,845 ERROR [org.apache.catalina.connector.CoyoteAdapter] (http-0.0.0.0-9080-1) An exception or error occurred in the container during the request processing
> java.lang.NullPointerException
> at org.jboss.web.rewrite.TomcatResolver.resolve(TomcatResolver.java:59)
> at org.jboss.web.rewrite.Substitution$ServerVariableElement.evaluate(Substitution.java:63)
> at org.jboss.web.rewrite.Substitution.evaluate(Substitution.java:235)
> at org.jboss.web.rewrite.RewriteCond.evaluate(RewriteCond.java:198)
> at org.jboss.web.rewrite.RewriteRule.evaluate(RewriteRule.java:112)
> at org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:293)
> at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
> at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:905)
> at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:592)
> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)
> at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list