php-proxy icon indicating copy to clipboard operation
php-proxy copied to clipboard

transfer-encoding: chunked misleads browser

Open h2g-internetagentur opened this issue 9 years ago • 4 comments

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.

h2g-internetagentur avatar Oct 11 '16 13:10 h2g-internetagentur

On what website is that happening?

Athlon1600 avatar Oct 18 '16 18:10 Athlon1600

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

domsie avatar Nov 04 '16 09:11 domsie

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...

domsie avatar Nov 04 '16 09:11 domsie

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.

h2g-internetagentur avatar Nov 14 '16 13:11 h2g-internetagentur