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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user