Comparison

plugins/mod_http_errors.lua @ 8363:e2460edc2a2f

mod_http_errors: Set Content-Type header to HTML (fixes #1030)
author Kim Alvefur <zash@zash.se>
date Fri, 27 Oct 2017 13:28:34 +0200
parent 7492:9a749cf8c1ba
child 8364:f91ab40a3105
comparison
equal deleted inserted replaced
8362:c7d6c2558a24 8363:e2460edc2a2f
70 })); 70 }));
71 end 71 end
72 end 72 end
73 73
74 module:hook_object_event(server, "http-error", function (event) 74 module:hook_object_event(server, "http-error", function (event)
75 if event.response then
76 event.response.headers.content_type = "text/html; charset=utf-8";
77 end
75 return get_page(event.code, (show_private and event.private_message) or event.message); 78 return get_page(event.code, (show_private and event.private_message) or event.message);
76 end); 79 end);