From cf3cba8f5f761569ea04d7accd2ab8f72d9ec23e Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 16 Nov 2017 10:33:51 -0600 Subject: [PATCH] Ensure Chrome Still SC_MOVED_TEMPORARILY Issue: gh-4831 --- .../ExceptionHandlingConfigurerTests.groovy | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy index aad5e4242f..15f8e213d5 100644 --- a/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy +++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurerTests.groovy @@ -100,6 +100,16 @@ class ExceptionHandlingConfigurerTests extends BaseSpringSpec { response.status == HttpServletResponse.SC_UNAUTHORIZED } + def "Chrome is Form by default"() { + setup: + loadConfig(DefaultSecurityConfig) + when: + request.addHeader("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8") + springSecurityFilterChain.doFilter(request,response,chain) + then: + response.status == HttpServletResponse.SC_MOVED_TEMPORARILY + } + def "ContentNegotiationStrategy defaults to HeaderContentNegotiationStrategy"() { when: loadConfig(HttpBasicAndFormLoginEntryPointsConfig)