{"action":"created","issue":{"url":"https://api.github.com/repos/thumbor/thumbor/issues/565","labels_url":"https://api.github.com/repos/thumbor/thumbor/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/thumbor/thumbor/issues/565/comments","events_url":"https://api.github.com/repos/thumbor/thumbor/issues/565/events","html_url":"https://github.com/thumbor/thumbor/issues/565","id":109103283,"number":565,"title":"Thumbor reporting wrong version","user":{"login":"okor","id":142910,"avatar_url":"https://avatars.githubusercontent.com/u/142910?v=3","gravatar_id":"","url":"https://api.github.com/users/okor","html_url":"https://github.com/okor","followers_url":"https://api.github.com/users/okor/followers","following_url":"https://api.github.com/users/okor/following{/other_user}","gists_url":"https://api.github.com/users/okor/gists{/gist_id}","starred_url":"https://api.github.com/users/okor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okor/subscriptions","organizations_url":"https://api.github.com/users/okor/orgs","repos_url":"https://api.github.com/users/okor/repos","events_url":"https://api.github.com/users/okor/events{/privacy}","received_events_url":"https://api.github.com/users/okor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-30T14:25:45Z","updated_at":"2015-09-30T14:58:00Z","closed_at":null,"body":"I've checked out version 4.12.2 locally to investigate and issue and possibly patch. We will be upgrading in the near future but due to the change in async/sync in 5.0 we need to stick with 4.12.2 for a bit.\r\n\r\nSo, the problem I am having is two fold. Our production version of Thumbor is not setting the correct `Content-Type` for webp images (just reported to me yesterday) - we think. Wanted to confirm it was Thumbor and not something in our production stack, caching layer, etc. Most browsers don't care but Chrome on iOS which supports webp does care and will simply not render the image if the Content-Type is not `image/webp`. \r\n\r\nHere is one such example sitting behind our CDN: https://cdn2.vox-cdn.com/thumbor/OMEoUhCUd5LTrAoYyp00QvAPBjs=/64x0:1437x772/800x450/filters:format(webp)/cdn0.vox-cdn.com/uploads/chorus_image/image/47292802/Screen_Shot_2015-09-29_at_4.58.08_PM.0.0.png\r\n\r\nAnd a direct link to Thumbor: http://thumbor.voxmedia.com/thumbor/OMEoUhCUd5LTrAoYyp00QvAPBjs=/64x0:1437x772/800x450/filters:format(webp)/cdn0.vox-cdn.com/uploads/chorus_image/image/47292802/Screen_Shot_2015-09-29_at_4.58.08_PM.0.0.png\r\n\r\nBoth with the incorrect Content-Type\r\n\r\nA colleague pointed out this PR: https://github.com/thumbor/thumbor/pull/425/files\r\n\r\nWhich appears to be in version 4.12.2: https://github.com/thumbor/thumbor/blob/b12e623a0d1f318abd265f2d6927d01af2bfc71e/thumbor/handlers/__init__.py#L218\r\n\r\nWe thought that maybe the \"auto webp\" and the filters may be setting the Content-Type in a different way. So I set out to investigate, checkout out the last commit on 4.12.2:\r\n\r\n```\r\ncommit b12e623a0d1f318abd265f2d6927d01af2bfc71e\r\nAuthor: Guilherme Souza <guivideojob@gmail.com>\r\nDate:   Wed Mar 18 15:27:21 2015 -0300\r\n\r\n    Bump to 4.12.2\r\n````\r\n\r\n^ last commit on this local 4.12.2 branch\r\n\r\nBut if I curl a test url:\r\n```\r\n ~/Projects/voxmedia/thumbor $ curl -I \"http://localhost:8888/unsafe/0x401/filters:format(webp)/cdn0.vox-cdn.com/uploads/chorus_image/image/47283870/verge-2015-06-14_13-32-08.0.0.0.jpg\"\r\nHTTP/1.1 200 OK\r\nContent-Length: 7634\r\nExpires: Thu, 01 Oct 2015 14:17:25 GMT\r\nServer: Thumbor/5.1.0\r\nEtag: \"a5cc42c60657a38ba85943ab621870d3342e611e\"\r\nCache-Control: max-age=86400,public\r\nDate: Wed, 30 Sep 2015 14:17:24 GMT\r\nContent-Type: image/webp\r\n```\r\n\r\n^ 5.1.0 version is reported. I also did extensive search replace of all assignments to Content-Type and content_type variables to \"icecold/beer\", just to see if I could see which call was actually setting the Content-Type since it didn't change when I updated the value in the change from the previously mentioned PR.\r\n\r\nSo, I probably have something funky going on with my dev setup but I don't know what it is. I did do a fresh clone and checkout but that didn't have any affect on the version of Thumbor reported. I'm sure this is something stupid I am doing but would appreciate any help you could provide.\r\n\r\np.s. I also tried running `python -m compileall .` after reading about pyc, thinking maybe there was a code cache issue. But no dice. That was before the fresh clone.\r\n\r\n![i-have-no-idea-what-im-doing-dog](https://cloud.githubusercontent.com/assets/142910/10195820/92bc3ade-675d-11e5-99df-66366bd2737b.jpg)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/thumbor/thumbor/issues/comments/144437762","html_url":"https://github.com/thumbor/thumbor/issues/565#issuecomment-144437762","issue_url":"https://api.github.com/repos/thumbor/thumbor/issues/565","id":144437762,"user":{"login":"okor","id":142910,"avatar_url":"https://avatars.githubusercontent.com/u/142910?v=3","gravatar_id":"","url":"https://api.github.com/users/okor","html_url":"https://github.com/okor","followers_url":"https://api.github.com/users/okor/followers","following_url":"https://api.github.com/users/okor/following{/other_user}","gists_url":"https://api.github.com/users/okor/gists{/gist_id}","starred_url":"https://api.github.com/users/okor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okor/subscriptions","organizations_url":"https://api.github.com/users/okor/orgs","repos_url":"https://api.github.com/users/okor/repos","events_url":"https://api.github.com/users/okor/events{/privacy}","received_events_url":"https://api.github.com/users/okor/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T14:58:00Z","updated_at":"2015-09-30T14:58:00Z","body":"@guilhermef The \"Accept\" is forwarded, yes. But I don't think that's the issue. It's the response `Content-Type` which I didn't think had anything to do with the Accepts. And in this case, we are asking for webp explicitly via the format filter, so I didn't think that's really relevant here. \r\n\r\nColleague strongly recommends using virtualenv, I am not currently. He thinks that's why trying to run thumbor is using lib version instead of local repo. I had issues getting virtualenv setup a while back and decided to roll without it ..... which I now believe was a blunder. I'll take the time to get a proper Python env setup. That's what I get for rushing!\r\n"}}