Include Last-Modified in HTTP response headers
While fiddling with a new project involving a UPnP client I noticed that Serviio does not include the "Last-Modified" header in its HTTP responses.
This post is a feature request to have it included, when reasonable and feasible (e.g. for local files but perhaps not for external resources).
For reference, check out section 2.2 in RFC 7232. Snapshot:
https://tools.ietf.org/html/rfc7232#section-2.2
2.2. Last-Modified
The "Last-Modified" header field in a response provides a timestamp
indicating the date and time at which the origin server believes the
selected representation was last modified, as determined at the
conclusion of handling the request.
Last-Modified = HTTP-date
An example of its use is
Last-Modified: Tue, 15 Nov 1994 12:45:26 GMT
2.2.1. Generation
An origin server SHOULD send Last-Modified for any selected
representation for which a last modification date can be reasonably
and consistently determined, since its use in conditional requests
and evaluating cache freshness ([RFC7234]) results in a substantial
reduction of HTTP traffic on the Internet and can be a significant
factor in improving service scalability and reliability.
To elaborate:
The code I am fiddling with scans the contents of the server and would in doing so like some means to figure out if a resource has changed since the last scan.
In that sense it would also be of interest to include a dc:date in UPnP ContentDirectory responses; it would spare one HTTP transaction per item in cases where no change has been made.
A HTTP ETag would also work. But neither dc:date nor ETags are part of this feature request.
Cheers,
volley