BasicAuthenticationFilter could check the scheme more efficiently #6183
Labels
in: web
An issue in web modules (web, webmvc)
status: first-timers-only
An issue that can only be worked on by brand new contributors
type: enhancement
A general enhancement
Milestone
BasicAuthenticationFilter
checks that theAuthorization
header starts with the "basic" scheme:However, this is not as efficient as it could be, since it needs to lowercase the entire header just to compare the first few characters.
org.springframework.util.StringUtils#startsWithIgnoreCase
is nice for situations like these:It would be great to do the same for the WebFlux counterpart,
ServerHttpBasicAuthenticationConverter
.The text was updated successfully, but these errors were encountered: