Description
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:
- ETag/If-None-Match logic in HttpEntityMethodProcessor should not affect methods other than HTTP GET [SPR-13496] #18074 ETag/If-None-Match logic in HttpEntityMethodProcessor should not affect methods other than HTTP GET
- Spring should have default support for OPTIONS, HEAD and Allow [SPR-13130] #17721 Spring should have default support for OPTIONS, HEAD and Allow
Referenced from: commits 0d6f800