trellis-ldp / trellis

Trellis is a platform for building scalable Linked Data applications
https://www.trellisldp.org
Apache License 2.0
105 stars 21 forks source link

Accept-Datetime should return the closest Memento #465

Closed gregjan closed 5 years ago

gregjan commented 5 years ago

According to RFC 7089, section 4.5.3, the Accept-Datetime header can request a date from a TimeGate prior to the first memento or after the last memento. In these cases, the specification says that the closest Memento should be selected. (Relates to #188 )

acoburn commented 5 years ago

Indeed -- in that case, the response should definitely be the first memento.

ajs6f commented 5 years ago

Just a note that this just bit me in the butt (the change requires backend changes). It might be good to document this behavior requirement in the Javadocs for MementoService::get.