Use the upstream function to get effectiveUrl

This commit is contained in:
Mikael Nordfeldth
2016-01-13 14:00:05 +01:00
parent eceafb84de
commit e75472f460
6 changed files with 11 additions and 11 deletions

View File

@@ -70,7 +70,7 @@ class DiscoveryHints {
}
return self::hcardHints($response->getBody(),
$response->getUrl());
$response->getEffectiveUrl());
}
static function hcardHints($body, $url)

View File

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