mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +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
|
@ -90,13 +90,12 @@ function parse_url_content(App $a)
|
|||
if ($curlResponse->isSuccess()) {
|
||||
// Convert the header fields into an array
|
||||
$hdrs = [];
|
||||
$h = $curlResponse->getHeaders();
|
||||
$h = explode("\n", $curlResponse->getHeader());
|
||||
foreach ($h as $l) {
|
||||
foreach ($l as $k => $v) {
|
||||
if (empty($hdrs[$k])) {
|
||||
$hdrs[$k] = $v;
|
||||
}
|
||||
$hdrs[$k] .= " " . $v;
|
||||
$header = array_map('trim', explode(':', trim($l), 2));
|
||||
if (count($header) == 2) {
|
||||
list($k, $v) = $header;
|
||||
$hdrs[$k] = $v;
|
||||
}
|
||||
}
|
||||
$type = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue