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

@ -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;