Skip to content

Reactive HttpComponentsClientHttpResponse ignores Expires cookie attribute #33157

@renetrefft

Description

@renetrefft

A cookie has the optional attributes Expires and Max-Age. If both are set, the latter takes precedence.

In method adaptCookies() of class org.springframework.http.client.reactive.HttpComponentsClientHttpResponse each HttpComponents Cookie is converted to a Spring ResponseCookie.

Given is an HttpComponents Cookie which has set Expires only, since adaptCookies() just reads Max-Age from Cookie, the resulting ResponseCookie has lost its expiration information.

Note: I have also checked ReactorClientHttpResponse, and it is not affected. Netty internally converts Expires to Max-Age. Thus, its Cookie class supports Max-Age only.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions