From 3e233122d0fa567ffc11914298abe15cf59599f4 Mon Sep 17 00:00:00 2001 From: doubleface Date: Fri, 12 Jul 2013 04:34:49 -0400 Subject: [PATCH] Proper handling of redirections --- vendor/PicoFeed/RemoteResource.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vendor/PicoFeed/RemoteResource.php b/vendor/PicoFeed/RemoteResource.php index 45b2cc2..f186f20 100644 --- a/vendor/PicoFeed/RemoteResource.php +++ b/vendor/PicoFeed/RemoteResource.php @@ -73,9 +73,6 @@ class RemoteResource { $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) { $this->is_modified = false; @@ -94,7 +91,8 @@ class RemoteResource $this->execute(); } 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']; } }