New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image proxy - drops images, fsocket/curl restrictions #5172

sbulen opened this Issue Nov 25, 2018 · 7 comments


None yet
3 participants

sbulen commented Nov 25, 2018


I just picked 21 random http: images from my forum. With the proxy off, all 21 show. In 2.0, with the proxy ON, 19 show & 2 are dropped. But in 2.1, with the proxy ON, 14 show & 7 are dropped... I see at least 4 different symptoms on the 7 items dropped. ("dropped" means not displayed at all.) I've confirmed this on WAMP & on Linux.

This one is odd, host headers are strange...

This image is not properly cached or displayed in 2.0.15 nor in 2.1.

Steps to reproduce

Test link:

Environment (complete as necessary)

  • Version/Git revision: today's
  • Database Type: mysql
  • Database Version: 5.7
  • PHP Version: 5.6

Additional information/references

@live627 live627 added this to the RC 2 milestone Nov 25, 2018


This comment has been minimized.


sbulen commented Nov 25, 2018

I just noticed that this image works fine on my 2.1 WAMP server, but not on my unix server. There's a clue in there somewhere...


This comment has been minimized.


sbulen commented Nov 26, 2018

What is strange about this image is this: the header comes back with an http status of 200... BUT... It returns an https image. So, a redirect is occurring internally, without a 301/302/307 & new location. (You can simply click on the link above & inspect the headers to confirm this...)



This comment has been minimized.


jdarwood007 commented Nov 27, 2018

Tested and it is sending a proper 301, but does send it in a weird way in which I wonder if the library is misdirecting the hostname.

$ telnet 80
Connected to
Escape character is '^]'.
HTTP/1.1 301 Moved Permanently
Date: Tue, 27 Nov 2018 04:39:32 GMT
Server: Apache
Location: https:///datas/users/8418-nopickupslespaul.jpg
Cache-Control: max-age=2592000
Expires: Thu, 27 Dec 2018 04:39:32 GMT
Vary: Accept-Encoding
Content-Length: 254
Connection: close
Content-Type: text/html; charset=iso-8859-1
Set-Cookie: PH_HPXY_CHECK=s1; path=/
Cache-control: private

<title>301 Moved Permanently</title>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https:///datas/users/8418-nopickupslespaul.jpg">here</a>.</p>
Connection closed by foreign host.

A wget shows it properly redirecting.

$ wget
--2018-11-26 20:38:32--
Connecting to||:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: [following]
--2018-11-26 20:38:36--
Connecting to||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 59685 (58K) [image/jpeg]
Saving to: ‘8418-nopickupslespaul.jpg’

8418-nopickupslespaul.jpg                        100%[=========================================================================================================>]  58.29K   378KB/s    in 0.2s

2018-11-26 20:38:37 (378 KB/s) - ‘8418-nopickupslespaul.jpg’ saved [59685/59685]

This comment has been minimized.


sbulen commented Nov 27, 2018

Everything looks good on my local WAMP server & matches the above.

My linux server is hosted thru a different provider & has zero luck with that photo. The sockets attempt fails on a connection refused. (This photo only....)

My suspicion is that my host is blacklisted by the provider for that site for fsockets & curl. I've seen similar things before, with different hosts. Usually just a temporary issue until they sort it out.

Image links in posts work, but the image proxy won't work under these circumstances for those photos. So you enable the proxy & the images disappear.

The solution is pretty simple, actually - to treat it the same way we treat files that are too large to cache, just do the redirect.

@sbulen sbulen referenced a pull request that will close this issue Nov 27, 2018


If it cannot be cached, fall back to redirect #5175


This comment has been minimized.


sbulen commented Nov 29, 2018

Here's another image with similar behavior. This one fails on both my WAMP & linux servers:


This comment has been minimized.


sbulen commented Nov 30, 2018

Notes on the above:

  • The photobucket image doesn't exist anymore. Normally photobucket sends you a dummy replacement image telling you so. Those informative replacement images disappear with the proxy enabled.
  • The gitare item only fails on some servers (only one of my two)
  • The other 2 fail on both of my servers

@sbulen sbulen changed the title from Image proxy - drops image, reason really unknown... to Image proxy - drops images, fsocket/curl restrictions Nov 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment