Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding Last-Modified response header to mdq-server #11

Open
trscavo opened this issue Aug 11, 2014 · 1 comment
Open

adding Last-Modified response header to mdq-server #11

trscavo opened this issue Aug 11, 2014 · 1 comment
Assignees

Comments

@trscavo
Copy link

trscavo commented Aug 11, 2014

I know the spec doesn't require a Last-Modified header but the response would be more readable (by humans) if it had one. Can one be added?

@iay iay self-assigned this Sep 4, 2014
@iay iay added the enhancement label Sep 4, 2014
@iay
Copy link
Owner

iay commented Jun 4, 2015

Need to work out whether Last-Modified should refer to:

  • The instant the ItemCollectionLibrary last completed its fetch/index operation (it would need to be passed as part of the IdentifiedItemCollection), or
  • The instant the particular Result was rendered from the identified collection (it would need to be stored in the cached Result.

It looks to me as if RFC 7232 requires the latter, by indicating that:

The "Last-Modified" header field in a response provides a timestamp
indicating the date and time at which the origin server believes the
selected representation was last modified, as determined at the
conclusion of handling the request.

Also, in RFC 7231:

In responses to safe requests, validator
fields describe the selected representation chosen by the origin
server while handling the response.

As the representation may change from render to render of the "same" metadata, it seems we need to be conservative about this. Of course it would be nice to be able to push the Last-Modified date backwards to the last time the underlying metadata had changed (within limits) but a lot more work would need to be done in the caching layers to achieve that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants