mirror of
https://github.com/friendica/friendica
synced 2025-04-25 21:10:11 +00:00
Fix IHTTPResult::getHeader/s()
- Split functionality "getHeader()" and "getHeaders()" analog to IMessageInterface::getHeader/s() - Fix functionality at various places - Adapt CurlResultTest
This commit is contained in:
parent
fff94563d7
commit
933ea7c9ce
11 changed files with 96 additions and 28 deletions
|
@ -746,7 +746,8 @@ class OStatus
|
|||
|
||||
$xml = '';
|
||||
|
||||
if (stristr($curlResult->getHeader(), 'Content-Type: application/atom+xml')) {
|
||||
if ($curlResult->inHeader('Content-Type') &&
|
||||
stristr($curlResult->getHeader('Content-Type'), 'application/atom+xml')) {
|
||||
$xml = $curlResult->getBody();
|
||||
}
|
||||
|
||||
|
@ -939,7 +940,8 @@ class OStatus
|
|||
|
||||
$xml = '';
|
||||
|
||||
if (stristr($curlResult->getHeader(), 'Content-Type: application/atom+xml')) {
|
||||
if ($curlResult->inHeader('Content-Type') &&
|
||||
stristr($curlResult->getHeader('Content-Type'), 'application/atom+xml')) {
|
||||
Logger::log('Directly fetched XML for URI ' . $related_uri, Logger::DEBUG);
|
||||
$xml = $curlResult->getBody();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue