imgflo / imgflo-server

HTTP image processing server based on imgflo
48 stars 7 forks source link

Missing Gravatar can result in wrongly cached results #43

Open jonnor opened 8 years ago

jonnor commented 8 years ago

https://s.gravatar.com/avatar/6d8c157b8db7b3266d5e616c0006f367?d=https%3A%2F%2Fpassport.thegrid.io%2Fprofile-fallback.png is now a face, however

https://imgflo.herokuapp.com/graph/vahj1ThiexotieMo/712bf632e9d4752eee99670c7bb6c8b5/passthrough?input=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6d8c157b8db7b3266d5e616c0006f367%3Fd%3Dhttps%253A%252F%252Fpassport.thegrid.io%252Fprofile-fallback.png&width=100 However returns a bunch of grids

Probably at some point got the default as the input (https://passport.thegrid.io/profile-fallback.png), and then user added a Gravatar and Gravatar started returning that instead... On the same URL

jonnor commented 8 years ago

Fixing the specific url here requires #34

jonnor commented 8 years ago

Can we use ETag' of input resource to detect this? Or possibly hash the input ourselves? In latter case we'd probably need to do the checkups at some regular intervals, as a background job. A problem is that sometimes the previous result was the 'better' one...

jonnor commented 8 years ago

Checking regularly would require #24

jonnor commented 8 years ago

Think the proper solution is to:

If this fails, might want to be able to mark an image input as 'unprocessable' - so API clients can detect, and possibly attempt to do something to fix it.