From 3dd5fb0468977c6626fe4a0ea7b95222f14da09f Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Sat, 29 Aug 2026 20:05:00 +0200 Subject: Apply code review suggestions Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- src/headers.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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, { -- adds a header with a given canonical capitalization, e.g. for headers -- whose capitalization titlecase(header) would not reproduce correctly function _M.setcanonic(header) + if type(header) ~= "string" then + error("header must be a string", 2) + end _M.canonic[header:lower()] = header end -- cgit v1.2.3-55-g6feb