Software /
code /
prosody
Changeset
7487:88a0a947e58c
mod_http_files: send valid ETag header
RFC 2616 section 14 (header field definitions) shows that ETag header content
should be wrapped in double quotes.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 09 Jul 2016 21:55:37 +0800 |
parents | 7486:c415a3fd4485 |
children | 7489:d32406f27efd |
files | plugins/mod_http_files.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_http_files.lua Sat Jul 09 17:33:38 2016 +0800 +++ b/plugins/mod_http_files.lua Sat Jul 09 21:55:37 2016 +0800 @@ -109,7 +109,7 @@ local last_modified = os_date('!%a, %d %b %Y %H:%M:%S GMT', attr.modification); response_headers.last_modified = last_modified; - local etag = ("%02x-%x-%x-%x"):format(attr.dev or 0, attr.ino or 0, attr.size or 0, attr.modification or 0); + local etag = ('"%02x-%x-%x-%x"'):format(attr.dev or 0, attr.ino or 0, attr.size or 0, attr.modification or 0); response_headers.etag = etag; local if_none_match = request_headers.if_none_match