- Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regressionA bug that is also a regression
Milestone
Description
Starting with spring-web 6.1.2, the HttpHeaders supplied to RestClientResponseException are copied into a new LinkedMultiValueMap, that is not case-insensitive anymore.
Headers from getResponseHeaders() can then no longer be found without the correct case.
public RestClientResponseException( String message, HttpStatusCode statusCode, String statusText, @Nullable HttpHeaders headers, @Nullable byte[] responseBody, @Nullable Charset responseCharset) { ... this.responseHeaders = copyHeaders(headers); ... } private static HttpHeaders copyHeaders(@Nullable HttpHeaders headers) { if (headers != null) { MultiValueMap<String, String> result = new LinkedMultiValueMap<>(headers.size()); headers.forEach((name, values) -> values.forEach(value -> result.add(name, value))); return HttpHeaders.readOnlyHttpHeaders(result); } else { return null; } }Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: regressionA bug that is also a regressionA bug that is also a regression