Slug header?

Going through the AtomPub protocol, I discovered that it introduces an HTTP header called Slug (see Section 9.7). I find the name quite funny, and it is an unexpected (though not surprising) part of AtomPub. And it should be applicable outside of AtomPub, so why not spread the word of its existence. 8-)

The header is used by the client creating a new entry to suggest to the server what the server should put as part of the URI of the new entry. Typically, an entry like the one you're reading could be located at http://jacek.cz/blog/2008/02/04/slug-header — but I don't have my blogging engine set up to do that, I like my numbers. Anyway, when creating the entry using an AtomPub client, it would say "Slug: Slug header?" and that's how it'd get into the URI.

Oh, and while the AtomPub RFC says Slug's an entity header, I'd have thought that it's more of a request header — it applies more to the POST than to the new entry, and it won't get transferred back with the entry content (response entity) when you go GET it later. Minor detail, not that anybody really cares about the differences between request/response and entity headers.

Tiny things like the Slug header make the Web infrastructure fun.

Posted at 2121 on Mon, Feb 4, 2008 in category Links | TrackBack | Comments feed
Comments
Post a comment



(will not be published)





Remember personal info?