Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

  $ curl -s https://blog.cloudflare.com/content/images/2015/08/white.jpg | md5
  ccf22bc377846166ed65cd3cd58d2e3d
  $ curl -s https://blog.cloudflare.com/content/images/2015/08/brown.jpg | md5
  810cac197d97da7b216c7883be523495
  $ curl -s https://blog.cloudflare.com/content/images/2015/08/black.jpg | md5
  6bede506abffe08d0c2406d92fbff393
Let me guess, the CloudFlare CDN is recompressing the images? :D


The original article has the correct images:

  $ curl -s http://www.fishtrap.co.uk/black.jpg.coll | md5
  b69dd1fd1254868b6e0bb8ed9fe7ecad
  $ curl -s http://www.fishtrap.co.uk/brown.jpg.coll | md5
  b69dd1fd1254868b6e0bb8ed9fe7ecad
  $ curl -s http://www.fishtrap.co.uk/white.jpg.coll | md5
  b69dd1fd1254868b6e0bb8ed9fe7ecad


Good catch. CloudFlare's optimizations are often too good for their own good. Fixing.


If you download the files to disk, you'll get the right values:

    $ curl -s https://blog.cloudflare.com/content/images/2015/08/white.jpg > file && md5 file                                                 
    MD5 (file) = b69dd1fd1254868b6e0bb8ed9fe7ecad
I've seen this same sort of thing happen with curl in other contexts, but I've never tracked down the details. I assume it has something to do with file stream handling in certain versions of curl. You'll see a discrepancy if you look at the output of piping to 'wc' vs. examining the downloaded file.


I ran the same curl command twice in a row and got files with different sizes! I think it actually does have to do with Cloudflare rather than with curl in this case.


Apparently sometimes the CDN is stripping the EXIF data




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: