Description
Juergen Hoeller opened SPR-17588 and commented
The specific header setter methods in HttpHeaders
use MultiValueMap.set/add
for populating the underlying data structure. Unfortunately, null
values are mostly being stored as null
entries in single-entry lists for a header, or sometimes being skipped altogether. While the end result (e.g. in a populated server response) usually ignores null
header values anyway and all getFirst
access returns null
just like it would in case of a non-existing header as well, some user-level accessor methods (e.g. HttpHeaders.getCacheControl()
return a bogus text representation in case of a null
value. Let's streamline this for 5.1.4 as a continuation of the HttpHeaders
refactoring in the 5.1.x line.
Affects: 5.1.3
Reference URL: jetty/jetty.project#1116
Issue Links:
- Improve WebFlux performance for header management [SPR-17250] #21783 Improve WebFlux performance for header management
- SimpleClientHttpRequestFactory: headers with null values should be sent as empty Strings [SPR-13225] #17816 SimpleClientHttpRequestFactory: headers with null values should be sent as empty Strings
- Allow java.time types for setting the Last-Modified header [SPR-17571] #22103 Allow java.time types for setting the Last-Modified header
Referenced from: commits 5bbbc82