jsumners / jsumners/feedparser
No bozo exception when bozo is raised, using etag on redirected site.
Open
Nobody has claimed this yet.
auto-migrated
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two feedparser.parse calls shown in the issue, comparing redirected requests that use an etag with the direct URL and the resulting status, bozo, and bozo_exception attributes. Trace the redirect and etag handling, then verify that a bozo flag is accompanied by an identifiable bozo_exception in the redirected case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100