# HG changeset patch # User Kim Alvefur # Date 1580844008 -3600 # Node ID 505ae524b635f847c43a5dbb4390ad616d08120e # Parent fea0c1bed1a05eb1fb0f4fdd72816dc6b9732e6c mod_rest: Remove debug hack to ignore Accept header diff -r fea0c1bed1a0 -r 505ae524b635 mod_rest/mod_rest.lua --- a/mod_rest/mod_rest.lua Tue Feb 04 20:19:09 2020 +0100 +++ b/mod_rest/mod_rest.lua Tue Feb 04 20:20:08 2020 +0100 @@ -318,7 +318,7 @@ local http_server = require "net.http.server"; module:hook_object_event(http_server, "http-error", function (event) local request, response = event.request, event.response; - if true or decide_type(request and request.headers.accept or "") == "application/json" then + if decide_type(request and request.headers.accept or "") == "application/json" then if response then response.headers.content_type = "application/json"; end