Skip to content

Support for conditional PUT in Web MVC (using If-Unmodified-Since header) [SPR-13863] #18436

Closed

Description

@spring-projects-issues

M. Justin opened SPR-13863 and commented

I have been converting a Jersey/JAX-RS application to Spring Web MVC, and discovered that while JAX-RS supports conditional PUT (using the "If-Unmodified-Since" header and the 412 "Precondition Failed" response) through Request.evaluatePreconditions, Spring Web MVC does not.

Looking through the spring-web codebase, the only reference to "If-Unmodified-Since" that I could find is in HttpEntityMethodProcessor. And that code only applies to GET requests. Additionally, there's WebRequest.checkNotModified (and seems to parallel the JAX-RS Request.evaluatePreconditions method), but only checks the "If-Modified-Since" header and also works only for GET and HEAD requests.

For my project I will be implementing conditional PUT manually. However, it feels like conditional PUT (and DELETE) requests should be baked into the Spring MVC framework.


Issue Links:

Referenced from: commits 0d6f800

Activity

  1. added
    type: enhancement
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions