aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorAnton Shestakov <av6@dwimlabs.net>2016-07-09 21:55:37 +0800
committerAnton Shestakov <av6@dwimlabs.net>2016-07-09 21:55:37 +0800
commit368a4d0cf8d304e1d088384fe1eaa6755e9541c1 (patch)
treef2ec23ca57050c8db2692d007db9a1d756ce2bb1 /plugins
parent3e39dcb91599232fd141fa8919e9188f7314c9fc (diff)
downloadprosody-368a4d0cf8d304e1d088384fe1eaa6755e9541c1.tar.gz
prosody-368a4d0cf8d304e1d088384fe1eaa6755e9541c1.zip
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_files.lua2
1 files changed, 1 insertions, 1 deletions
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