-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
type: bugA general bugA general bug
Milestone
Description
The property server.tomcat.use-relative-redirects (backed by the field org.springframework.boot.autoconfigure.web.ServerProperties.Tomcat#useRelativeRedirects) has no declared default value. In addition to that, the code which reads the property in org.springframework.boot.autoconfigure.web.servlet.TomcatServletWebServerFactoryCustomizer#customize only applies something to the tomcat context, if an explicit value is configured.
Given this defensive approach I'd expect to get the tomcat default, if no value is configured, but this isn't the case.
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory#prepareContext explicitly sets this to false.
I'd suggest to either
- not set a value in
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory#prepareContextin order to use tomcat's default behaviour or - change the type of
org.springframework.boot.autoconfigure.web.ServerProperties.Tomcat#useRelativeRedirectsfromBoolean(boxed) toboolean(unboxed/primitive) and make the default value offalsemore explicit.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug