|
|
|
@ -1145,6 +1145,22 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
@@ -1145,6 +1145,22 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
|
|
|
|
setDate(LAST_MODIFIED, lastModified); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Set the time the resource was last changed, as specified by the |
|
|
|
|
* {@code Last-Modified} header. |
|
|
|
|
*/ |
|
|
|
|
public void setLastModified(Instant lastModified) { |
|
|
|
|
setInstant(LAST_MODIFIED, lastModified); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Set the time the resource was last changed, as specified by the |
|
|
|
|
* {@code Last-Modified} header. |
|
|
|
|
*/ |
|
|
|
|
public void setLastModified(ZonedDateTime lastModified) { |
|
|
|
|
setZonedDateTime(LAST_MODIFIED, lastModified); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Return the time the resource was last changed, as specified by the |
|
|
|
|
* {@code Last-Modified} header. |
|
|
|
@ -1266,6 +1282,15 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
@@ -1266,6 +1282,15 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
|
|
|
|
set(headerName, DATE_FORMATTERS[0].format(date)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Set the given date under the given header name after formatting it as a string |
|
|
|
|
* using the RFC-1123 date-time formatter. The equivalent of |
|
|
|
|
* {@link #set(String, String)} but for date headers. |
|
|
|
|
*/ |
|
|
|
|
public void setInstant(String headerName, Instant date) { |
|
|
|
|
setZonedDateTime(headerName, ZonedDateTime.ofInstant(date, GMT)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Set the given date under the given header name after formatting it as a string |
|
|
|
|
* using the RFC-1123 date-time formatter. The equivalent of |
|
|
|
|