public final class IfRange extends HeaderString
If the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity.
If-Range: "737060cd8c284d8af7ad3082f209582d"
The If-Range header allows a client to "short-circuit" the second request. Informally, its meaning is `if the entity is unchanged, send me the part(s) that I am missing; otherwise, send me the entire new entity'.
If-Range = "If-Range" ":" ( entity-tag | HTTP-date )
If the client has no entity tag for an entity, but does have a Last- Modified date, it MAY use that date in an If-Range header. (The server can distinguish between a valid HTTP-date and any form of entity-tag by examining no more than two characters.) The If-Range header SHOULD only be used together with a Range header, and MUST be ignored if the request does not include a Range header, or if the server does not support the sub-range operation.
If the entity tag given in the If-Range header matches the current entity tag for the entity, then the server SHOULD provide the specified sub-range of the entity using a 206 (Partial content) response. If the entity tag does not match, then the server SHOULD return the entire entity using a 200 (OK) response.
Modifier and Type | Method and Description |
---|---|
Date |
asDate()
Returns this header value as a
Date object. |
EntityValidator |
asValidator()
Returns this header value as an
EntityValidator object. |
static IfRange |
forString(String value)
Returns a parsed
If-Range header. |
asString, eq, eqIC, toString
public static IfRange forString(String value)
If-Range
header.value
- The If-Range
header string.If-Range
header, or public Date asDate()
Date
object.Date
object, or public EntityValidator asValidator()
EntityValidator
object.EntityValidator
object, or Copyright © 2018 Apache. All rights reserved.