LastModifiedVersion

data class LastModifiedVersion(lastModified: GMTDate) : Version

This version passes the given lastModified date through the client provided http conditional headers If-Modified-Since and If-Unmodified-Since.

Notice the second precision so it may work wrong if there were few changes during the same second.

For better behaviour use etag instead

See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28 and https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25

Parameters

lastModified

of the current content, for example file's last modified date

Constructors

Link copied to clipboard
fun LastModifiedVersion(lastModified: Date)
Link copied to clipboard
fun LastModifiedVersion(lastModified: GMTDate)

Functions

Link copied to clipboard
open override fun appendHeadersTo(builder: HeadersBuilder)

Appends relevant headers to the builder

Link copied to clipboard
open override fun check(requestHeaders: Headers): VersionCheckResult
Link copied to clipboard
fun ifModifiedSince(dates: List<GMTDate>): Boolean

If-Modified-Since logic: all dates should be before this date (truncated to seconds).

Link copied to clipboard
fun ifUnmodifiedSince(dates: List<GMTDate>): Boolean

If-Unmodified-Since logic: all dates should not be before this date (truncated to seconds).

Properties

Link copied to clipboard
val lastModified: GMTDate