o.s.s.w.util.matcher.AndRequestMatcher : Trying to match using NegatedRequestMatcher [requestMatcher=MediaTypeRequestMatcher [contentNegotiationStrategy=org.springframework.web.accept.ContentNegotiationManager@27dc79f7, matchingMediaTypes=[application/json], useEquals=false, ignoredMediaTypes=[*/*]]]
o.s.s.w.u.m.MediaTypeRequestMatcher : httpRequestMediaTypes=[*/*]
While in core 4.x we got
o.s.s.w.util.matcher.AndRequestMatcher : Trying to match using NegatedRequestMatcher [requestMatcher=MediaTypeRequestMatcher [contentNegotiationStrategy=org.springframework.web.accept.ContentNegotiationManager@44cb460e, matchingMediaTypes=[application/json], useEquals=false, ignoredMediaTypes=[*/*]]]
o.s.s.w.u.m.MediaTypeRequestMatcher : httpRequestMediaTypes=[]
As MediaType.TEXT_HTML always matches with */*, we're always getting redirect to login page, instead of 401 with curl. We need to change this logic how entry point is chosen.
There is a change in core https://github.com/spring-projects/spring-framework/commit/f3994467c4e1094f5229d05c5679550f956cba8e, which now causes
While in core 4.x we got
We're been using:
As
MediaType.TEXT_HTML
always matches with*/*
, we're always getting redirect to login page, instead of401
with curl. We need to change this logic how entry point is chosen.