mod_rest: Remove debug hack to ignore Accept header
authorKim Alvefur <zash@zash.se>
Tue, 04 Feb 2020 20:20:08 +0100
changeset 3878 505ae524b635
parent 3877 fea0c1bed1a0
child 3879 93f71ab6cb00
mod_rest: Remove debug hack to ignore Accept header
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