Update to PicoFeed v0.1.33

This commit is contained in:
Frederic Guillot 2017-04-06 22:08:27 -04:00
parent 73a4597e21
commit 7e8c740b24
6 changed files with 26 additions and 22 deletions

View File

@ -17,7 +17,7 @@
"fguillot/simple-validator": "v1.0.0",
"fguillot/json-rpc": "v1.2.3",
"fguillot/picodb": "v1.0.14 ",
"fguillot/picofeed": "v0.1.32",
"fguillot/picofeed": "v0.1.33",
"pda/pheanstalk": "v3.1.0",
"ircmaxell/password-compat": "^1.0.4"
},

14
composer.lock generated
View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "adf4db185f22a2e00d21d278ba1fa7bc",
"content-hash": "98e20f0db34bd3ce534c09d7bfcf0179",
"hash": "2e41ff910022a7ea02922ced8ec2e1be",
"content-hash": "13b249b65e7dc65f4c7de72a80ee31c3",
"packages": [
{
"name": "fguillot/json-rpc",
@ -88,16 +88,16 @@
},
{
"name": "fguillot/picofeed",
"version": "v0.1.32",
"version": "v0.1.33",
"source": {
"type": "git",
"url": "https://github.com/fguillot/picoFeed.git",
"reference": "fb20400dc8400474bf50d40976fa48beb018166b"
"reference": "b44f1e1fdecfd2e7f158df86a23e1ea3dfb4e16f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/fb20400dc8400474bf50d40976fa48beb018166b",
"reference": "fb20400dc8400474bf50d40976fa48beb018166b",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/b44f1e1fdecfd2e7f158df86a23e1ea3dfb4e16f",
"reference": "b44f1e1fdecfd2e7f158df86a23e1ea3dfb4e16f",
"shasum": ""
},
"require": {
@ -137,7 +137,7 @@
],
"description": "Modern library to handle RSS/Atom feeds",
"homepage": "https://github.com/fguillot/picoFeed",
"time": "2017-04-05 19:55:52"
"time": "2017-04-07 01:57:15"
},
{
"name": "fguillot/simple-validator",

View File

@ -265,17 +265,17 @@
},
{
"name": "fguillot/picofeed",
"version": "v0.1.32",
"version_normalized": "0.1.32.0",
"version": "v0.1.33",
"version_normalized": "0.1.33.0",
"source": {
"type": "git",
"url": "https://github.com/fguillot/picoFeed.git",
"reference": "fb20400dc8400474bf50d40976fa48beb018166b"
"reference": "b44f1e1fdecfd2e7f158df86a23e1ea3dfb4e16f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/fb20400dc8400474bf50d40976fa48beb018166b",
"reference": "fb20400dc8400474bf50d40976fa48beb018166b",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/b44f1e1fdecfd2e7f158df86a23e1ea3dfb4e16f",
"reference": "b44f1e1fdecfd2e7f158df86a23e1ea3dfb4e16f",
"shasum": ""
},
"require": {
@ -295,7 +295,7 @@
"suggest": {
"ext-curl": "PicoFeed will use cURL if present"
},
"time": "2017-04-05 19:55:52",
"time": "2017-04-07 01:57:15",
"bin": [
"picofeed"
],

View File

@ -299,7 +299,11 @@ class Curl extends Client
list($status, $headers) = HttpHeaders::parse(explode("\n", $this->response_headers[$this->response_headers_count - 1]));
if ($this->isRedirection($status)) {
return $this->handleRedirection($headers['Location']);
if (empty($headers['Location'])) {
$status = 200;
} else {
return $this->handleRedirection($headers['Location']);
}
}
return array(

View File

@ -24,7 +24,7 @@ class HttpHeaders implements ArrayAccess
public function offsetGet($offset)
{
return $this->headers[strtolower($offset)];
return $this->offsetExists($offset) ? $this->headers[strtolower($offset)] : '';
}
public function offsetSet($offset, $value)

View File

@ -56,13 +56,13 @@ class Reader extends Base
/**
* Discover and download a feed.
*
* @param string $url Feed or website url
* @param string $url Feed or website url
* @param string $last_modified Last modified HTTP header
* @param string $etag Etag HTTP header
* @param string $username HTTP basic auth username
* @param string $password HTTP basic auth password
*
* @return \PicoFeed\Client\Client
* @param string $etag Etag HTTP header
* @param string $username HTTP basic auth username
* @param string $password HTTP basic auth password
* @return Client
* @throws SubscriptionNotFoundException
*/
public function discover($url, $last_modified = '', $etag = '', $username = '', $password = '')
{