Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
7.1.1.Final
-
None
-
Workaround Exists
-
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.