symphonycms/jit_image_manipulation — pull request #78 by dustywilson (2014-01-03 11:13:23+00:00)
Title: Fix getHttpResponseCode str/int equality mismatch

On line 290, the test for 200 HTTP response failed because the Gateway returns the HTTP code as a string, not an integer. The previous library used in this extension (curl) returned an integer. The equality test was strict, therefore "200" !== 200, even though the response code was OK.

This caused trouble with external images being pulled through the JIT since it would consider the remote file to be bad, even though it returned a 200 code, which then caused the local cache to also be unusable.

Honestly, I'd have preferred to have fixed the Gateway (to make it return an integer), but that seems to be too big of a hurdle since it's probably got some code relying on the fact it's a string these days. C'est la vie.