Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3557

eap640ga rewritevalve rewriterule does not allow port

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 6.4.0.GA
    • Web (JBoss Web)
    • None

      Not possible to specify port in rewritevalve rewrite rule, following fails:
      RewriteRule .* https://:%

      {HTTP_HOST}:8443%{REQUEST_URI} [R,L]
      (see link directly below for correctly formatted version)
      https://github.com/ams10961/eap645ga-weld1131-rewrite/blob/master/src/main/webapp/WEB-INF/rewrite.properties.fails

      with following exception
      04:46:47,645 ERROR [org.apache.catalina.core] (ServerService Thread Pool – 56) JBWEB001097: Error starting context /eap645ga: java.lang.IllegalArgumentException:
      https://%{HTTP_HOST}

      :8443%

      {REQUEST_URI}
      at org.jboss.web.rewrite.Substitution.parse(Substitution.java:195) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
      at org.jboss.web.rewrite.RewriteRule.parse(RewriteRule.java:45) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]
      at org.jboss.web.rewrite.RewriteValve.parse(RewriteValve.java:251) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

      (see link directly below for correctly formatted version)
      https://github.com/ams10961/eap645ga-weld1131-rewrite/blob/master/logs/jbosseap-rewrite-port-local.log

      Have not been able to find a workaround for this.

      Some debug logging for org.jboss.web.rewrite.* classes would be super useful too, e.g. dump variables, e.g. %{REQUEST_URI}

      , whether a condition matched, values before and after rewrite.

      Key files to recreate:
      https://github.com/ams10961/eap645ga-weld1131-rewrite/blob/master/pom.xml
      https://github.com/ams10961/eap645ga-weld1131-rewrite/blob/master/src/main/webapp/WEB-INF/beans.xml
      https://github.com/ams10961/eap645ga-weld1131-rewrite/blob/master/src/main/webapp/WEB-INF/web.xml
      https://github.com/ams10961/eap645ga-weld1131-rewrite/blob/master/src/main/webapp/WEB-INF/jboss-web.xml
      https://github.com/ams10961/eap645ga-weld1131-rewrite/blob/master/src/main/webapp/WEB-INF/rewrite.properties.fails
      https://github.com/ams10961/eap645ga-weld1131-rewrite/blob/master/logs/jbosseap-rewrite-port-local.log

              rpelisse@redhat.com Romain Pelisse
              ams10961_jira andrew simpson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified