Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4478

Non-absolute redirects when using AJP1.3 connector results in undefined:// scheme being used for the Location header

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.1.1.Final
    • Web
    • None
    • Workaround Exists
    • Hide

      In the JBoss configuration for AJP connector definition, add scheme="http" attribute, i.e.

      <connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" scheme="http"/>

      Show
      In the JBoss configuration for AJP connector definition, add scheme="http" attribute, i.e. <connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" scheme="http"/>

    Description

      When you have a Apache httpd using mod_proxy_ajp in front of JBoss AS 7 and doing a redirect in Java code by e.g. response.sendRedirect("/something"), the end result is that user will see "Location: undefined://<...>/something" header in the response, which of course is a big fail.

      This bug has already been reported at https://issues.jboss.org/browse/AS7-1227. The issue has been marked as resolved with fix being in 7.1.0.CR1. However, this is not correct. The issue was fixed in someone's private Github fork at https://github.com/jfclere/jboss-as/commit/4a25bad9ff432e646f3dc6e6f220de45b80eb4f3. However, this commit was never pulled to the upstream tree and thus the problem still exists in the latest released version 7.1.1.Final. See https://github.com/jbossas/jboss-as/blob/7.1.0.Final/web/src/main/java/org/jboss/as/web/WebConnectorAdd.java#L142 for 7.1.0.Final version of the troublesome piece of code. This code was refactored a bit for 7.1.1.Final, but the root problem still persists, see https://github.com/jbossas/jboss-as/blob/7.1.1.Final/web/src/main/java/org/jboss/as/web/WebConnectorAdd.java#L90.

      Attachments

        Activity

          People

            rhn-engineering-jclere Jean-Frederic Clere
            tjormola Tuomas Jormola (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: