Skip to content

Set 304 status on ServerResponse when ETag/LastModified match [SPR-16348] #20895

@spring-projects-issues

Description

@spring-projects-issues

Nikola Kolosnjaji opened SPR-16348 and commented

When Controller returns 200 OK and Mono<ResponseEntity<String>> with Etag HTTP header, second GET will result in 304 HTTP status, if client sends correct If-None-Match HTTP header.
This is not the case when using functional Endpoints.

Same behaviour would be expected with WebFlux.fn and ServerResponse and using 'Cache-Control', 'ETag', and/or 'If-Modified-Since' HTTP headers
reference: https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-caching-etag-lastmodified

Attached sample which reproduce the problem with two endponts: /contoller & /handler


Affects: 5.0.2

Attachments:

Referenced from: commits c53c8bf

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