diff mod_rest/mod_rest.lua @ 3874:505ae524b635

mod_rest: Remove debug hack to ignore Accept header
author Kim Alvefur <zash@zash.se>
date Tue, 04 Feb 2020 20:20:08 +0100
parents fea0c1bed1a0
children 75b330d4fa6f
line wrap: on
line diff
--- 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