From 4d5a6d14940dcb16d7c3615f96b54e495b9b1d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= Date: Wed, 15 Nov 2017 20:17:37 +0000 Subject: 2013: use lowercase header keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Asbjørn Sloth Tønnesen --- web/labitrackd.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/labitrackd.lua b/web/labitrackd.lua index 133050e..df84bdf 100755 --- a/web/labitrackd.lua +++ b/web/labitrackd.lua @@ -286,7 +286,7 @@ local function save_or_update(req, res) set_json_nocache_headers(res) local expected = "application/json" - assert(string.sub(req.headers['Content-Type'], 1, string.len(expected)) == expected) + assert(string.sub(req.headers['content-type'], 1, string.len(expected)) == expected) local body = req:body() local label = json.decode(body) @@ -321,7 +321,7 @@ POST('/print.json', function(req, res) set_json_nocache_headers(res) local expected = "application/x-www-form-urlencoded" - assert(string.sub(req.headers['Content-Type'], 1, string.len(expected)) == expected) + assert(string.sub(req.headers['content-type'], 1, string.len(expected)) == expected) local body = unescape(req:body()) expected = "image=data:image/png;base64," -- cgit v1.2.1