From 963b9aab801b5003287c072c2a766d699c70b00f Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Thu, 3 Mar 2022 15:42:53 +0100 Subject: Make it_debug::$force_html decision based on Accept header containing text/html, not User-Agent --- it_debug.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it_debug.class b/it_debug.class index 136ea99..bddd63b 100644 --- a/it_debug.class +++ b/it_debug.class @@ -78,7 +78,7 @@ static function setup() if (ob_get_level() == 0 && $_SERVER['REMOTE_ADDR']) ob_start(); # prevent later 'headers already sent' error - if ($_SERVER['REMOTE_ADDR'] && !EDC('edplain') && !it::match('curl|wget', $_SERVER['HTTP_USER_AGENT'])) + if ($_SERVER['REMOTE_ADDR'] && !EDC('edplain') && it::match('(?:^|,)\s*text/html\s*(?:,|$)', $_SERVER['HTTP_ACCEPT'])) self::$force_html = true; } -- cgit v1.2.3