Skip to content

SimpleClientHttpRequestFactory: headers with null values should be sent as empty Strings [SPR-13225] #17816

Closed
@spring-projects-issues

Description

@spring-projects-issues

Anatoly Deyneka opened SPR-13225 and commented

RestTemplate+SimpleClientHttpRequestFactory:
All headers with null values are sent without colon.
Such requests are rejected by HAProxy(<BADREQ>).
BTW it's correctly processed in HttpComponentsClientHttpRequestFactory

HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.set("some-header", null);
HttpEntity<byte[]> entity = new HttpEntity<>(requestHeaders);
restTemplate.exchange(url, HttpMethod.GET, entity, SomeResponse.class);

Affects: 4.1.6

Issue Links:

Referenced from: commits de6bbe7

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions