mirror of
https://github.com/friendica/friendica
synced 2025-04-29 21:04:24 +02:00
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:
parent
4b59fe4cf7
commit
069753416d
11 changed files with 28 additions and 96 deletions
|
@ -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)), ';,'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue