Revert "Fix IHTTPResult::getHeader/s() - Split functionality "getHeader()" and "getHeaders()" analog to IMessageInterface::getHeader/s() - Fix functionality at various places - Adapt CurlResultTest"

This reverts commit 933ea7c9
This commit is contained in:
Philipp 2020-10-11 23:26:03 +02:00
parent 4b59fe4cf7
commit 069753416d
No known key found for this signature in database
GPG key ID: 9A28B7D4FF5667BD
11 changed files with 28 additions and 96 deletions

View file

@ -175,6 +175,7 @@ class ParseUrl
return $siteinfo;
}
$header = $curlResult->getHeader();
$body = $curlResult->getBody();
if ($do_oembed) {
@ -203,7 +204,7 @@ class ParseUrl
$charset = '';
// Look for a charset, first in headers
// Expected form: Content-Type: text/html; charset=ISO-8859-4
if (preg_match('/charset=([a-z0-9-_.\/]+)/i', $curlResult->getContentType(), $matches)) {
if (preg_match('/charset=([a-z0-9-_.\/]+)/i', $header, $matches)) {
$charset = trim(trim(trim(array_pop($matches)), ';,'));
}