Commit ae6971a6 authored by Andy Wilkinson's avatar Andy Wilkinson

Upgrade to Tomcat 8.0.30 and continue to use absolute redirects

Tomcat 8.0.30 has changed to using relative URIs in its redirects
by default. To avoid any problems that this behaviour change may
causes we override the default and configure Tomcat to continue to
use absolute URIs.

Closes gh-4715
parent b10b7a88
......@@ -134,7 +134,7 @@
<thymeleaf-extras-conditionalcomments.version>2.1.1.RELEASE</thymeleaf-extras-conditionalcomments.version>
<thymeleaf-layout-dialect.version>1.2.9</thymeleaf-layout-dialect.version>
<thymeleaf-extras-data-attribute.version>1.3</thymeleaf-extras-data-attribute.version>
<tomcat.version>8.0.28</tomcat.version>
<tomcat.version>8.0.30</tomcat.version>
<undertow.version>1.1.9.Final</undertow.version>
<velocity.version>1.7</velocity.version>
<velocity-tools.version>2.0</velocity-tools.version>
......
......@@ -167,6 +167,12 @@ public class TomcatEmbeddedServletContainerFactory
context.setParentClassLoader(
this.resourceLoader != null ? this.resourceLoader.getClassLoader()
: ClassUtils.getDefaultClassLoader());
try {
context.setUseRelativeRedirects(false);
}
catch (NoSuchMethodError ex) {
// Tomcat is < 8.0.30. Continue
}
SkipPatternJarScanner.apply(context, this.tldSkip);
WebappLoader loader = new WebappLoader(context.getParentClassLoader());
loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment