Set favorPathExtension to false by default

Applies a change that was intended in #23915 but wasn't.

Closes gh-26119
This commit is contained in:
Rossen Stoyanchev
2020-11-24 17:30:02 +00:00
parent 3612990344
commit 80701082cd
8 changed files with 64 additions and 33 deletions

View File

@@ -72,8 +72,8 @@ class ContentNegotiationManagerFactoryBeanTests {
this.servletRequest.setRequestURI("/flower.gif");
assertThat(manager.resolveMediaTypes(this.webRequest))
.as("Should be able to resolve file extensions by default")
.isEqualTo(Collections.singletonList(MediaType.IMAGE_GIF));
.as("Should not resolve file extensions by default")
.containsExactly(MediaType.ALL);
this.servletRequest.setRequestURI("/flower.foobarbaz");
@@ -226,6 +226,7 @@ class ContentNegotiationManagerFactoryBeanTests {
@Test
void ignoreAcceptHeader() throws Exception {
this.factoryBean.setIgnoreAcceptHeader(true);
this.factoryBean.setFavorParameter(true);
this.factoryBean.afterPropertiesSet();
ContentNegotiationManager manager = this.factoryBean.getObject();