Unverified Commit c0724f60 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:sparkles: feat(core) Allow Content-Type header with no charset

Used by webservice for application/json

issue #5989
Showing with 3 additions and 1 deletion
+3 -1
......@@ -230,8 +230,10 @@ class Language
if (!headers_sent()) {
header("Content-Language: $lang".(empty($country) ? '' : "-$country"));
if (!empty($char)) {
if (!empty($char) && preg_match('|^text/|', $mime)) {
header("Content-Type: $mime; charset=$char");
} else {
header("Content-Type: $mime");
}
} else {
trigger_error('Could not set language '.$lang.' header, headers already sent');
......
Supports Markdown
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