Skip to content
This repository has been archived by the owner on Aug 21, 2019. It is now read-only.

Internal server error when handling 302 HTTP status for an image #11

Open
doherty opened this issue Nov 11, 2012 · 0 comments
Open

Internal server error when handling 302 HTTP status for an image #11

doherty opened this issue Nov 11, 2012 · 0 comments
Labels

Comments

@doherty
Copy link

doherty commented Nov 11, 2012

The URL is: http://mustachify.me/?src=http%3A%2F%2F1.gravatar.com%2Favatar%2Fd89011c93da3548ee26ccb76ccd17dbd%3Fs%3D80%26d%3Dhttp%253A%252F%252Fhashbang.ca%252Fwp-includes%252Fimages%252Fblank.gif%26r%3DR

So, the src attribute, when urldecoded is: http://1.gravatar.com/avatar/d89011c93da3548ee26ccb76ccd17dbd?s=80&d=http%3A%2F%2Fhashbang.ca%2Fwp-includes%2Fimages%2Fblank.gif&r=R

If there is no gravatar for that hash, then it will give a 302 Found and a Location header for gravatar's mirrored copy of whatever url is in the d attribute. When urldecoded, in this case it is http://hashbang.ca/wp-includes/images/blank.gif - and the mirrored copy is at http://i0.wp.com/hashbang.ca/wp-includes/images/blank.gif:

$ wget 'http://1.gravatar.com/avatar/d89011c93da3548ee26ccb76ccd17dbd?s=80&d=http%3A%2F%2Fhashbang.ca%2Fwp-includes%2Fimages%2Fblank.gif&r=R'
--2012-11-10 19:34:42--  http://1.gravatar.com/avatar/d89011c93da3548ee26ccb76ccd17dbd?s=80&d=http%3A%2F%2Fhashbang.ca%2Fwp-includes%2Fimages%2Fblank.gif&r=R
Resolving 1.gravatar.com (1.gravatar.com)... 72.21.91.121, 2606:2800:220:bf1:95:a65:51f:1a94
Connecting to 1.gravatar.com (1.gravatar.com)|72.21.91.121|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://i0.wp.com/hashbang.ca/wp-includes/images/blank.gif [following]
--2012-11-10 19:34:42--  http://i0.wp.com/hashbang.ca/wp-includes/images/blank.gif
Resolving i0.wp.com (i0.wp.com)... 72.21.91.111, 2606:2800:220:1c85:99b:1b56:207e:ea5
Connecting to i0.wp.com (i0.wp.com)|72.21.91.111|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 43 [image/gif]
Saving to: `d89011c93da3548ee26ccb76ccd17dbd?s=80&d=http:%2F%2Fhashbang.ca%2Fwp-includes%2Fimages%2Fblank.gif&r=R'

100%[=======================================================================================================>] 43          --.-K/s   in 0s      

2012-11-10 19:34:42 (2.58 MB/s) - `d89011c93da3548ee26ccb76ccd17dbd?s=80&d=http:%2F%2Fhashbang.ca%2Fwp-includes%2Fimages%2Fblank.gif&r=R' saved [43/43]

It appears that 302s are not handled properly, because this results in an internal server error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant