Will's blog

purpose: Will Kahn-Greene's blog of Miro, PyBlosxom, Python, GNU/Linux, random content, PyBlosxom, Miro, and other projects mixed in there ad hoc, half-baked, and with a twist of lemon

[ home | blog home | recent activity ]

Sun, 02 Jan 2005

RSS Problems

I was checking my apache logs and noticed there are dozens of feed readers pulling my RSS data. They're not pulling index.xml--which is the RSS 2.0 nicely-rendered data, but rather the RSS 0.9.1 flavour that comes by default with PyBlosxom.

The problems with this are two-fold. First, I don't have num_entries set in config.py. So every time someone requests the RSS 0.9.1 feed, they get all of my entries. It's around 340K or so. I'm amazed no one ever complained about this. If they had, I would have told them to get the other feed--the one I advertise--instead.

The second problem is that I didn't have the conditionalhttp plugin running. So every time someone requested the RSS 0.9.1 feed, they get all my entries--even if I haven't added any new ones since the last time they requested it.

I couldn't adjust the num_entries property in my config.py file, though, because it would mess up my paging plugin. So I tossed things around a bit and decided to add this code to my config.py file:

import os
query_string = os.environ.get("QUERY_STRING", "")
if query_string.find("flav=rss") != -1:
   py['num_entries'] = 20

This code checks to see if someone is grabbing the RSS flavour of my blog which is my unadvertised-I-wish-no-one-would-request-it RSS 0.9.1 feed and set the num_entries property to 20. Otherwise, it doesn't get set.

Then I tossed in the conditionalhttp plugin which does the whole last-modified thing further reducing the amount of bandwidth I'm burning away pointlessly.

Comments:

Posted by sil on Tue Jan 4 09:12:49 2005
Why not just redirect requests for the old 0.9.1 feed to the nice 2.0 feed with Alias or mod_rewrite?


Posted by will on Wed Jan 5 17:33:38 2005
Two reasons.  First, I think changing the feed out from underneath whoever is pulling the RSS 0.9.1 feed is a bit rude.  The second reason is that it's a bit complex since they're specifying the feed using a querystring and the RSS 2.0 feed is specified using a path and changing a querystring feed request to a path feed request isn't exactly trivial.

However, if you think I'm wrong on that, feel free to provide the appropriate mod_rewrite/alias rules.  Apache htaccess rules aren't exactly my forte.


Posted by Christopher Baus on Fri Jan 21 13:16:54 2005
Here are my rules....

They 301 redirect my http://www.baus.net/?flav=rss feed to http://feeds.baus.net/ so readers can find it.  Then http://feeds.baus.net/ is proxied to http://feeds.feedburner.com/baus which is transparent to users.

RewriteCond %{query_string} ^flav=rss$
RewriteRule ^/$ http://feeds.baus.net/? [R=301,L]
RewriteRule ^/$ http://feeds.feedburner.com/baus [P,L]


Posted by Richard Jones on Sat Feb 5 16:38:42 2005
I can't seem to find an RSS link anywhere on your blog page. There's a link to an RSS validator, which appears to be set up to validate your HTML page...


Post a new comment:

Three things:

  1. New comments get placed in a "draft" status and will NOT show up on the site until I explicitly approve it. Sometimes that happens within 24 hours.
  2. I reserve the right to reject/remove inappropriate comments.
  3. Sometimes I'll reply to a comment directly in email--so make sure your email address is correct.

If you can't for some reason post a comment, send me an email: willg at bluesock dot org.

Your name:


Your e-mail address (this doesn't get displayed to anyone--sometimes I'll reply directly to you):


URL of your website (optional):


Comment:


Yes, I am a human!


pyblosxom::1.5-dev git-master

Copyright 1996 to 2012, Will Guaraldi Kahn-Greene, under the Creative Commons BY-SA 3.0 license

Creative Commons License
Will's Blog by William Kahn-Greene is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.