Merge branch '5.1.x'

This commit is contained in:
Juergen Hoeller
2019-04-02 20:13:29 +02:00
5 changed files with 19 additions and 12 deletions

View File

@@ -64,6 +64,8 @@ import org.springframework.util.StringUtils;
* <li>{@link #set(String, String)} sets the header value to a single string value</li>
* </ul>
*
* <p>Note that {@code HttpHeaders} generally treats header names in a case-insensitive manner.
*
* @author Arjen Poutsma
* @author Sebastien Deleuze
* @author Brian Clozel
@@ -416,6 +418,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
/**
* Construct a new, empty instance of the {@code HttpHeaders} object.
* <p>This is the common constructor, using a case-insensitive map structure.
*/
public HttpHeaders() {
this(CollectionUtils.toMultiValueMap(new LinkedCaseInsensitiveMap<>(8, Locale.ENGLISH)));
@@ -423,6 +426,9 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
/**
* Construct a new {@code HttpHeaders} instance backed by an existing map.
* <p>This constructor is available as an optimization for adapting to existing
* headers map structures, primarily for internal use within the framework.
* @param headers the headers map (expected to operate with case-insensitive keys)
* @since 5.1
*/
public HttpHeaders(MultiValueMap<String, String> headers) {