mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
6605953eb5
The current implementation suggests that the request's headers are not expected to change. Hence, it's not necessary to copy them. Furthermore, it might be costly to do so if there are many headers. Instead, cache only the request's header names for method getHeaderNames. Methods getHeader and getHeaders delegate to the respective methods of request if the header name is not in FORWARDED_HEADER_NAMES. Otherwise, they return null or an empty Enumeration respectively. See gh-27466