[Devel] Bugs in handling redirected feeds nicely?
mary-planet at puzzling.org
Wed Jun 2 11:39:28 EST 2004
I've moved one of my feeds in the last few days and set up the old feed
to redirect to the new with HTTP return code 302.
This has given me the opportunity to unearth what I think are a few bugs
in Planet's (or feedparser's?) handling of redirects:
- if feed X redirects to feed Y, Planet's request for feed Y will not
include the relevant If-None-Match etc headers, even if it has seen
feed Y before, resulting in feed Y always being returned in full by
the server; and
- if feed X redirects to feed Y, feed Y will be cached in an
appropriate file, but the relevant planetlib.Channel object's
cached_items variable will not be updated to contain feed Y's items
after the redirect. It will always contain feed X's items.
The latter showed up for me as a separate bug in my own Planet tree: I
have code that only regenerates the output file if at least one feed has
updated (where updated == "feed contains items that do not appear in the
cache"). The output file was being regenerated every time :)
More information about the Devel