From: Anton Shestakov Date: Sat, 9 Jul 2016 13:55:37 +0000 (+0800) Subject: mod_http_files: send valid ETag header X-Git-Url: https://git.enpas.org/?p=prosody.git;a=commitdiff_plain;h=87fd458b978eae310245ec4678ec1312e8da3f31 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. --- diff --git a/plugins/mod_http_files.lua b/plugins/mod_http_files.lua index 3b602495..40f46c9c 100644 --- a/plugins/mod_http_files.lua +++ b/plugins/mod_http_files.lua @@ -109,7 +109,7 @@ function serve(opts) 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