Athlon1600 / php-proxy

A web proxy script written in PHP and built as an alternative to Glype.
https://www.php-proxy.com
MIT License
298 stars 158 forks source link

transfer-encoding: chunked misleads browser #38

Open h2g-internetagentur opened 7 years ago

h2g-internetagentur commented 7 years ago

If a proxied server responses with chunked content the header misleads the browser cause the content you get by cURL is already unchunked but you still send the transfer-encoding: chunked header to the client (which now expects chunked content). You have to get the raw content from cURL or remove the transfer-encoding header.

Athlon1600 commented 7 years ago

On what website is that happening?

domsie commented 7 years ago

https://uk1.unblockvideos.com/index.php?q=mKzapmqUY6uq0qOXmJmToKSizaLGkanNqI-a0aBomNSUnZSpnsaknaTKkp2WYsioomLQqZBha5tmlGublmaYlmFqk2plmWxlbsRjml6Vx59mZp5pw5ZrxmePodU

domsie commented 7 years ago

the original ressource: http://storage.googleapis.com/code.snapengage.com/js/1271349c-c112-4548-8a2d-abf1383bf2b2.js

the "chunked" problem is on many google-sites...

h2g-internetagentur commented 7 years ago

Actually I have proxied browsersync (to access it by a regular hostname instead of host:port) and its built in webserver made the chunked response.