atmos/camo — pull request #15 by tanoku (2012-07-27 17:47:44+00:00)
Title: Follow temporary redirects

![](http://i0.kym-cdn.com/photos/images/newsfeed/000/349/483/721.jpg)

This was preventing images hosted in droplr from being embedded in GitHub comments. See a standard droplr request here, with a 307 redirect:

```
* About to connect() to d.pr port 80 (#0)
* Trying 50.112.98.242... connected
* Connected to d.pr (50.112.98.242) port 80 (#0)
> GET /i/rr7F+ HTTP/1.1
> User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
> Host: d.pr
> Accept: */*
>
< HTTP/1.1 307 nginx/1.2.1
< Content-Type: text/html
< Date: Fri, 27 Jul 2012 17:46:32 GMT
< Location: https://s3.amazonaws.com/files.droplr.com/files_production/tmp_fa734f0e3e8bfc9cc31dda1d59f914ae/rr7F?AWSAccessKeyId=AKIAJSVQN3Z4K7MT5U2A&Expires=1343411252&Signature=zJOTqMjao4yDh6SBfkIKySS86qI%3D&response-content-disposition=inline%3B+filename%3D%22721.jpeg%22
< Set-Cookie: ci_session=a%3A4%3A%7Bs%3A10%3A%22session_id%22%3Bs%3A32%3A%224ff5cc52c1eda8d8a04e5a2b8c547029%22%3Bs%3A10%3A%22ip_address%22%3Bs%3A13%3A%2210.252.53.109%22%3Bs%3A10%3A%22user_agent%22%3Bs%3A50%3A%22curl%2F7.21.4+%28universal-apple-darwin11.0%29+libcurl%2F7%22%3Bs%3A13%3A%22last_activity%22%3Bi%3A1343411192%3B%7D538853f3d73f54a8400ff1aec905e44d; expires=Mon, 25-Jul-2022 17:46:32 GMT; path=/
< Content-Length: 0
< Connection: keep-alive
<
* Connection #0 to host d.pr left intact
* Closing connection #0
```

This is not ready for merging, though. Somehow, the URL in the test suite keeps 403ing on me. Could this be related to the headers Camo is using? @atmos, throw me a hand once you have a new haircut.