diff options
Diffstat (limited to 'src/headers.lua')
| -rw-r--r-- | src/headers.lua | 3 |
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 |
| 38 | function _M.setcanonic(header) | 38 | function _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 |
| 40 | end | 43 | end |
| 41 | 44 | ||
