Skip to content

Add get/set-IfUnmodifiedSince, get/set-IfMatch methods on HttpHeaders [SPR-14228] #18802

Closed
@spring-projects-issues

Description

@spring-projects-issues

Sebastiaan van Erk opened SPR-14228 and commented

For a conditional PUT request I would like to use the If-Match header, however there is no corresponding get method on HttpHeaders. Similarly, there is no method for If-Unmodified-Since. The methods do exist for the If-None-Match and If-Modified since headers.

The methods are easy to add and quite useful for optimistic concurrency control on REST services.

For now there is a simple workaround for the missing If-Unmodified-Since method since the getFirstDate(String header) method is public, but it's a bit uglier for the If-Match header since the corresponding getFirstHeaderAsList(String header) method is protected.

Best regards,
Sebastiaan


Affects: 4.2.5

Issue Links:

Referenced from: commits 55dae61

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