atmos/camo — pull request #9 by dhui (2012-01-10 06:38:05+00:00)
Title: Support HTTP 301s

We've noticed that some of our users are linking to urls that return 301 instead of 200.

I've refactored the url fetching code into a function named process_url (open to renaming).
Much of this refactor involves making sure the scopes for variables are correct across the nested closures.

Added a missing return 404 for image content-type not being an image.

For 301s, a recursive call to process_url is made with a default max depth of 10.