URLs in feeds

I’ve just found and fixed a subtle problem with typo blog. One of my
readers complained that now and again, all entries in my feed would
show up as “new” even though they had been read. It turned out to be
a misconfiguration of my server: I was serving the same content as both
http://happygiraffe.net/ and http://www.happygiraffe.net/. The trouble
was that when I posted a new entry, the first person to access the feed
would decide which URL was stored in the cached feed. So all my guids
changed from one domain to another.

I’ve fixed this configuration for now with some heavy handed
application of mod_rewrite.

But I was wondering – should typo store the URL for the blog inside
itself and use that for URL generation? I took a brief look and saw
that it all boils down to Rails’ url_for being called from inside
article_url(). Would it be reasonable to always specify a :hostname
part using another setting? That would avoid gratuitous guid changes…

Thanks,
-Dom

We’re probably going to get something like this once multiple-blog
support
shows up, simply because it’ll require some way of storing the base_url
that
goes with each blog. Other then that, though, I’m not sure if it’s
really
worth it right now.

Anyway, the current trunk doesn’t use URL-based GUIDs for feeds–it
generates a fixed GUID for each article and uses it instead.

Scott

Hi,

On 3/5/06, Dominic M. [email protected] wrote:

I’ve just found and fixed a subtle problem with typo blog. One of my
readers complained that now and again, all entries in my feed would
show up as “new” even though they had been read. It turned out to be
a misconfiguration of my server: I was serving the same content as both
http://happygiraffe.net/ and http://www.happygiraffe.net/. The trouble
was that when I posted a new entry, the first person to access the feed
would decide which URL was stored in the cached feed. So all my guids
changed from one domain to another.

I believe this is no longer a problem in trunk typo (I believe all the
guid are automagically created and stored in db). I used to have that
problem but as soon as I moved to trunk it went away. Not sure if that
helps or not ;/


Cheers,

Peter D.

Blog: http://www.RealityForge.org

On Sun, Mar 05, 2006 at 12:22:45PM +1100, Peter D. wrote:

changed from one domain to another.

I believe this is no longer a problem in trunk typo (I believe all the
guid are automagically created and stored in db). I used to have that
problem but as soon as I moved to trunk it went away. Not sure if that
helps or not ;/

No – that’s great news. I keep meaning to upgrade to trunk anyway…

Thanks,
-Dom

On Sat, Mar 04, 2006 at 04:51:10PM -0800, Scott L. wrote:

We’re probably going to get something like this once multiple-blog support
shows up, simply because it’ll require some way of storing the base_url that
goes with each blog. Other then that, though, I’m not sure if it’s really
worth it right now.

No, the change isn’t worth doing immediately – it’s a small thing. But
it’s good to know that it will be addressed in future.

Anyway, the current trunk doesn’t use URL-based GUIDs for feeds–it
generates a fixed GUID for each article and uses it instead.

Thanks,
-Dom