From da29440e0b41cceb6c01e26e161920eaa03cce63 Mon Sep 17 00:00:00 2001 From: Erwin Soekianto Date: Fri, 11 Apr 2014 08:23:37 -0700 Subject: [PATCH] cleaner commit for PHP gzip issue --- PHP/proxy.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/PHP/proxy.php b/PHP/proxy.php index a01374aa..2cc8ad5d 100644 --- a/PHP/proxy.php +++ b/PHP/proxy.php @@ -392,22 +392,20 @@ public function setProxyHeaders() $header_content = trim(substr($this->response,0, $header_size)); - $headers = preg_split( '/\r\n|\r|\n/', $header_content); + $this->headers = preg_split( '/\r\n|\r|\n/', $header_content); - $this->headers = $headers; - - $hasHeaders = (boolean)$headers; - - if($hasHeaders){ + if((boolean)$this->headers){ foreach($this->headers as $key => $value) { - - if (stripos($value,'ETag:') !== false || stripos($value,'Content-Type:') !== false - || stripos($value,'Connection:') !== false || stripos($value,'Pragma:') !== false - || stripos($value,'Expires:') !== false) { - - header($value); //Sets the header + + if ($this->contains($value, "Transfer-Encoding: chunked")) { //See issue #75 + + continue; + } + + header($value); //Sets the header + } }else{