|
@@ 590-593 (lines=4) @@
|
| 587 |
|
{ |
| 588 |
|
if (in_array($sniffed, $application_types) || substr($sniffed, 0, 12) === 'application/' && substr($sniffed, -4) === '+xml') |
| 589 |
|
{ |
| 590 |
|
if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) |
| 591 |
|
{ |
| 592 |
|
$encodings[] = strtoupper($charset[1]); |
| 593 |
|
} |
| 594 |
|
$encodings = array_merge($encodings, $this->registry->call('Misc', 'xml_encoding', array($this->raw_data, &$this->registry))); |
| 595 |
|
$encodings[] = 'UTF-8'; |
| 596 |
|
} |
|
@@ 599-602 (lines=4) @@
|
| 596 |
|
} |
| 597 |
|
elseif (in_array($sniffed, $text_types) || substr($sniffed, 0, 5) === 'text/' && substr($sniffed, -4) === '+xml') |
| 598 |
|
{ |
| 599 |
|
if (isset($headers['content-type']) && preg_match('/;\x20?charset=([^;]*)/i', $headers['content-type'], $charset)) |
| 600 |
|
{ |
| 601 |
|
$encodings[] = $charset[1]; |
| 602 |
|
} |
| 603 |
|
$encodings[] = 'US-ASCII'; |
| 604 |
|
} |
| 605 |
|
// Text MIME-type default |