HaveF / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

No bozo exception when bozo is raised, using etag on redirected site. #383

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

This is probably not very pressing, but for the sake of consistency regarding 
implementation, I figured it should be pointed out.

The steps:

> a = feedparser.parse('http://www.vimcasts.org/feeds/ogg/')
> a.status
301
> a.href
http://vimcasts.org/feeds/ogg/ # Fair enough, no www.
> a.etag
'"8c313c632de238b30e290f5caba5ed63"' # Good, we have one.
> b = feedparser.parse('http://www.vimcasts.org/feeds/org/', etag=a.etag)
> b.status
301
> b.bozo
1
b.bozo_exception
AttributeError: object has no attribute 'bozo_exception'

So, bozo flag was set, indicating malformation, but no exception to attempt to 
identify what that malformation is. replacing the url with the correct url 
raises a 304 status, and no bozo flag, so that means the problem lies in the 
combination of redirection and etag use.

Original issue reported on code.google.com by astroche...@gmail.com on 14 Dec 2012 at 8:25

GoogleCodeExporter commented 9 years ago
I see I forgot to remove the first line of the help text. Sorry.

Original comment by astroche...@gmail.com on 14 Dec 2012 at 8:26