Verbose Logging

software development with some really amazing hair

T + S G I F R

Worst URL Shortener Ever

· · Posted in Programming
Tagged with

I was bored last night, so I hacked this up. My original thought was since riak has an HTTP interface, I could just proxy GET requests to it when a short URL was used, but either I was doing it wrong or you can't set the Location header when you POST documents. Oh well.

Anyway, this uses riak just to store the URL, and the riak key as the short URL key. There is no error checking, UI, or anything fancy. It's pretty much the simplest thing that could possibly work.

Also, it's kind of a lie, since the URLs it makes are actually a little long. Whatever.


Sharing is Caring