Commit 14264b17 authored by mikeytown2's avatar mikeytown2

Issue #2766611 by mikeytown2: Better text/plain detection.

parent 37b2744b
......@@ -2778,7 +2778,7 @@ function httprl_print_empty(&$data, $level = 0) {
*/
function httprl_pr($input) {
$output_plain_text = FALSE;
if (in_array('content-type: text/plain', array_map('strtolower', headers_list())) || (function_exists('drupal_is_cli') && drupal_is_cli())) {
if (strpos(implode("\n", array_map('strtolower', headers_list())), 'content-type: text/plain') !== FALSE || (function_exists('drupal_is_cli') && drupal_is_cli())) {
$output_plain_text = TRUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment