forked from GNUsocial/gnu-social
Use the upstream function to get effectiveUrl
This commit is contained in:
@@ -70,7 +70,7 @@ class DiscoveryHints {
|
||||
}
|
||||
|
||||
return self::hcardHints($response->getBody(),
|
||||
$response->getUrl());
|
||||
$response->getEffectiveUrl());
|
||||
}
|
||||
|
||||
static function hcardHints($body, $url)
|
||||
|
||||
@@ -127,7 +127,7 @@ class FeedDiscovery
|
||||
$type = $response->getHeader('Content-Type');
|
||||
$isHtml = preg_match('!^(text/html|application/xhtml\+xml)!i', $type);
|
||||
if ($isHtml) {
|
||||
$target = $this->discoverFromHTML($response->getUrl(), $response->getBody());
|
||||
$target = $this->discoverFromHTML($response->getEffectiveUrl(), $response->getBody());
|
||||
if (!$target) {
|
||||
throw new FeedSubNoFeedException($url);
|
||||
}
|
||||
@@ -149,7 +149,7 @@ class FeedDiscovery
|
||||
throw new FeedSubBadResponseException($response->getStatus());
|
||||
}
|
||||
|
||||
$sourceurl = $response->getUrl();
|
||||
$sourceurl = $response->getEffectiveUrl();
|
||||
$body = $response->getBody();
|
||||
if (!$body) {
|
||||
throw new FeedSubEmptyException($sourceurl);
|
||||
|
||||
Reference in New Issue
Block a user