Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-8325

JBWEB-157 NPE in TomcatResolver for client-requests without a Host-Header when a HTTP_HOST-RewriteCond is configured.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • TBD EAP 5
    • EAP_EWP 5.1.0
    • Web
    • None
    • Release Notes
    • NEW

    Description

      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)

      Attachments

        Activity

          People

            rmaucher Remy Maucherat
            sjmenden_jira Samuel Mendenhall (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: