Skip to content

SimplePie (trunk) doesn't correctly show 403 errors #102

raccettura opened this Issue Nov 6, 2010 · 2 comments

3 participants


I have a feed that's behind basic HTTP authentication (it's also https, but I don't think that's relevant here).

Ultimately this error resolves to:
1683: $this->error = "A feed could not be found at $this->feed_url";

Which seems triggered by this conditional:

1668: if ($file = $locate->find($this->autodiscovery, $this->all_discovered_feeds))

It would be great if it also checked for http 403 errors and displayed the correct error. The only way I could find this was tracing the code and doing a print_r() on $file to see something like this:

SimplePie_File Object
[url] =>
[useragent] => SimplePie/1.2.1-dev (Feed Parser;; Allow like Gecko) Build/20101106204233
[success] => 1
[headers] => Array
[server] => nginx/0.8
[date] => Sat, 06 Nov 2010 20:42:34 GMT
[content-type] => text/html; charset=utf-8
[connection] => keep-alive
[keep-alive] => timeout=300
[www-authenticate] => Basic realm=Secure Atom Feed
[vary] => Accept-Encoding
[content-encoding] => gzip
[content-length] => 80

[body] => You must enter a valid login ID and password to access this feed

[status_code] => 401
[redirects] => 0
[error] => 
[method] => 9


SimplePie member
rmccue commented Nov 9, 2010

Our error reporting for this needs redoing to better communicate the actual error. Only 404 errors should give that notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.