Proper handling of redirections
This commit is contained in:
parent
a5e9d41561
commit
3e233122d0
6
vendor/PicoFeed/RemoteResource.php
vendored
6
vendor/PicoFeed/RemoteResource.php
vendored
@ -73,9 +73,6 @@ class RemoteResource
|
|||||||
{
|
{
|
||||||
$response = $this->doRequest();
|
$response = $this->doRequest();
|
||||||
|
|
||||||
$this->etag = isset($response['headers']['ETag']) ? $response['headers']['ETag'] : '';
|
|
||||||
$this->last_modified = isset($response['headers']['Last-Modified']) ? $response['headers']['Last-Modified'] : '';
|
|
||||||
|
|
||||||
if ($response['status'] == 304) {
|
if ($response['status'] == 304) {
|
||||||
|
|
||||||
$this->is_modified = false;
|
$this->is_modified = false;
|
||||||
@ -94,7 +91,8 @@ class RemoteResource
|
|||||||
$this->execute();
|
$this->execute();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
$this->etag = isset($response['headers']['ETag']) ? $response['headers']['ETag'] : '';
|
||||||
|
$this->last_modified = isset($response['headers']['Last-Modified']) ? $response['headers']['Last-Modified'] : '';
|
||||||
$this->content = $response['body'];
|
$this->content = $response['body'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user