aboutsummaryrefslogtreecommitdiff
path: root/src/headers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/headers.lua')
-rw-r--r--src/headers.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/headers.lua b/src/headers.lua
index f8b8ef8..004ef37 100644
--- a/src/headers.lua
+++ b/src/headers.lua
@@ -36,6 +36,9 @@ setmetatable(_M.canonic, {
36-- adds a header with a given canonical capitalization, e.g. for headers 36-- adds a header with a given canonical capitalization, e.g. for headers
37-- whose capitalization titlecase(header) would not reproduce correctly 37-- whose capitalization titlecase(header) would not reproduce correctly
38function _M.setcanonic(header) 38function _M.setcanonic(header)
39 if type(header) ~= "string" then
40 error("header must be a string", 2)
41 end
39 _M.canonic[header:lower()] = header 42 _M.canonic[header:lower()] = header
40end 43end
41 44