# HG changeset patch # User Kim Alvefur # Date 1577955571 -3600 # Node ID 802087d3155a65e177643be3ba76103117a39bb0 # Parent a0b8ec44a36b7c3efbb36407e9a791764812ab8e mod_rest: Fix traceback on missing content-type header diff -r a0b8ec44a36b -r 802087d3155a mod_rest/mod_rest.lua --- a/mod_rest/mod_rest.lua Thu Jan 02 09:57:49 2020 +0100 +++ b/mod_rest/mod_rest.lua Thu Jan 02 09:59:31 2020 +0100 @@ -25,7 +25,7 @@ end local function parse(mimetype, data) - mimetype = mimetype:match("^[^; ]*"); + mimetype = mimetype and mimetype:match("^[^; ]*"); if mimetype == "application/xmpp+xml" then return xml.parse(data); elseif mimetype == "application/json" then