Software /
code /
prosody
Diff
plugins/mod_http_files.lua @ 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 |
parent | 7231:c018a44b822a |
child | 7490:b75b08af7a78 |
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