remotestorage / spec

remoteStorage Protocol Specification
https://tools.ietf.org/html/draft-dejong-remotestorage
87 stars 5 forks source link

Send `Last-Modified` in response to PUT #173

Open sonnyp opened 5 years ago

sonnyp commented 5 years ago

Could we add Last-Modified as a response header in the PUTexamples https://tools.ietf.org/html/draft-dejong-remotestorage-12#section-12.5

See https://tools.ietf.org/html/rfc7231#section-7.2 Also RFC 7231 says it's fine in our case:

An origin server MUST NOT send a validator header field
   (Section 7.2), such as an ETag or Last-Modified field, in a
   successful response to PUT unless the request's representation data
   was saved without any transformation applied to the body (i.e., the
   resource's new representation data is identical to the representation
   data received in the PUT request) and the validator field value
   reflects the new representation.

It helps with consistency and prevents having to send a subsequent HEAD request to have the precise/server date.