ldp icon indicating copy to clipboard operation
ldp copied to clipboard

Allow passing resource modification date for use with If-Unmodified-Since

Open escowles opened this issue 6 years ago • 0 comments

If we have retrieved the content that is being updated, we set the If-Unmodified-Since header to avoid dirty writes:

  • https://github.com/samvera/ldp/blob/master/lib/ldp/resource.rb#L69
  • https://github.com/samvera/ldp/blob/master/lib/ldp/resource.rb#L99

But if we haven't loaded the resource (e.g., we're getting new state from a form submission), it's not set at all (but we might have the modification date from the form). We should allow passing the modification date to enable using If-Unmodified-Since in that situation.

escowles avatar Jul 18 '18 18:07 escowles