public class LastModifiedVersion implements 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
Constructor and Description |
---|
LastModifiedVersion(io.ktor.util.date.GMTDate lastModified)
This version passes the given lastModified date through the client provided
http conditional headers If-Modified-Since and If-Unmodified-Since.
|
LastModifiedVersion(java.util.Date lastModified) |
Modifier and Type | Method and Description |
---|---|
void |
appendHeadersTo(HeadersBuilder builder)
Appends relevant headers to the builder
|
VersionCheckResult |
check(Headers requestHeaders) |
io.ktor.util.date.GMTDate |
component1()
of the current content,
|
LastModifiedVersion |
copy(io.ktor.util.date.GMTDate lastModified)
This version passes the given lastModified date through the client provided
http conditional headers If-Modified-Since and If-Unmodified-Since.
|
boolean |
equals(java.lang.Object p) |
io.ktor.util.date.GMTDate |
getLastModified()
of the current content,
|
int |
hashCode() |
java.lang.String |
toString() |
appendHeadersTo, check
public LastModifiedVersion(io.ktor.util.date.GMTDate lastModified)
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
lastModified
- of the current content, for example file's last modified datelastModified
- of the current content, for example file's last modified datepublic LastModifiedVersion(java.util.Date lastModified)
public VersionCheckResult check(Headers requestHeaders)
public void appendHeadersTo(HeadersBuilder builder)
Appends relevant headers to the builder
public io.ktor.util.date.GMTDate getLastModified()
of the current content,
for example file's last modified date
public io.ktor.util.date.GMTDate component1()
of the current content,
for example file's last modified date
public LastModifiedVersion copy(io.ktor.util.date.GMTDate lastModified)
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
lastModified
- of the current content, for example file's last modified datepublic java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)