summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>2017-11-15 20:17:37 +0000
committerAsbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>2017-11-15 20:17:37 +0000
commit4d5a6d14940dcb16d7c3615f96b54e495b9b1d06 (patch)
tree08b2aca80d40a2f82b6dfab2e0e13b9d8496d2cd /web
parent81e58832811e233fe91203dd2f8fa2fead58cc89 (diff)
downloadlabitrack-4d5a6d14940dcb16d7c3615f96b54e495b9b1d06.tar.gz
labitrack-4d5a6d14940dcb16d7c3615f96b54e495b9b1d06.tar.xz
labitrack-4d5a6d14940dcb16d7c3615f96b54e495b9b1d06.zip
2013: use lowercase header keys
Signed-off-by: Asbjørn Sloth Tønnesen <asbjorn@asbjorn.biz>
Diffstat (limited to 'web')
-rwxr-xr-xweb/labitrackd.lua4
1 files changed, 2 insertions, 2 deletions
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,"