Issue #144 (Add last_modified to WSF_SKELETON_HANDLER)
This commit is contained in:
@@ -49,6 +49,10 @@ feature {NONE} -- Implementation
|
|||||||
if attached a_handler.etag (req) as l_etag then
|
if attached a_handler.etag (req) as l_etag then
|
||||||
a_header.put_header_key_value ({HTTP_HEADER_NAMES}.header_etag, l_etag)
|
a_header.put_header_key_value ({HTTP_HEADER_NAMES}.header_etag, l_etag)
|
||||||
end
|
end
|
||||||
|
if attached a_handler.last_modified (req) as l_last_modified then
|
||||||
|
l_dt := (create {HTTP_DATE}.make_from_date_time (l_last_modified)).rfc1123_string
|
||||||
|
a_header.put_header_key_value ({HTTP_HEADER_NAMES}.header_last_modified, l_dt)
|
||||||
|
end
|
||||||
res.put_header_text (a_header.string)
|
res.put_header_text (a_header.string)
|
||||||
if l_ok then
|
if l_ok then
|
||||||
if l_chunked then
|
if l_chunked then
|
||||||
|
|||||||
@@ -167,6 +167,16 @@ feature -- Access
|
|||||||
deferred
|
deferred
|
||||||
end
|
end
|
||||||
|
|
||||||
|
last_modified (req: WSF_REQUEST): detachable DATE_TIME
|
||||||
|
-- When representation of resource selected in `req' was last modified;
|
||||||
|
-- SHOULD be set whenever it can reasonably be determined.
|
||||||
|
note
|
||||||
|
specification: "https://tools.ietf.org/html/rfc7232#section-2.2.1"
|
||||||
|
require
|
||||||
|
req_attached: req /= Void
|
||||||
|
deferred
|
||||||
|
end
|
||||||
|
|
||||||
modified_since (req: WSF_REQUEST; a_date_time: DATE_TIME): BOOLEAN
|
modified_since (req: WSF_REQUEST; a_date_time: DATE_TIME): BOOLEAN
|
||||||
-- Has resource requested in `req' been modified since `a_date_time' (UTC)?
|
-- Has resource requested in `req' been modified since `a_date_time' (UTC)?
|
||||||
require
|
require
|
||||||
|
|||||||
Reference in New Issue
Block a user