diff options
author | Christian Schneider | 2022-03-03 15:42:53 +0100 |
---|---|---|
committer | Christian Schneider | 2022-03-03 15:42:53 +0100 |
commit | 963b9aab801b5003287c072c2a766d699c70b00f (patch) | |
tree | fb530e18733844e4fccc1d87792695cf1449f870 | |
parent | e6476a8ee9083f8a17d92dfafc17a218f58062a6 (diff) | |
download | itools-963b9aab801b5003287c072c2a766d699c70b00f.tar.gz itools-963b9aab801b5003287c072c2a766d699c70b00f.tar.bz2 itools-963b9aab801b5003287c072c2a766d699c70b00f.zip |
Make it_debug::$force_html decision based on Accept header containing text/html, not User-Agent
-rw-r--r-- | it_debug.class | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |