When to mangle input
and when not to
Having tried to add this here essay site to Technorati (yeah, yeah,
it's not as if I ever have more than one or two readers and one of
those will be me), I noticed something interesting.
Specifically, Technorati refuses to let you have a URL that ends with
"/". Bit of a problem, since I rely on "/essay-tag/" as a
signifier of "you're actually looking for an essay or more". It will
helpfully lop the last "/" off, since OBVIOUSLY you didn't mean that,
did you?
Of course, in my case, I both have only myself to blame and help real
near at hand. It also meant a new feature, if you point a browser at
http://essays.hexapodia.net/latest/
you will always get the last changed essay displayed.
Anyhow, the long and short of this is three changes.
- If you ask for /latest/ you will get
the last updated essay (either the last to be written, changed or
having metadata changed).
- If you ask for /blogstyle/, you
will get the last N essays (latest change first).
- And finally, if you ask for "/anything", you'll get a
redirect to "/anything/".
I would've been much happier, if I hadn't needed to do these changes,
but on the up-side, I did it in a running site backend, though I had,
once, to do the scary "replace your set of handlers, completely"
fun-call. Well, I say "scary". It's only scary because I couldn't be
bothered setting up a test instance and if there was anything horribly
wrong with the dispatcher-thing I'd just modified, I'd be getting
crashes. As luck had it, it was (as far as changes goes) quite minor.
This is one of Ingvar's essays