Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #103 from esoekianto/cleaner-commit-gzip-issue
Browse files Browse the repository at this point in the history
cleaner commit for PHP gzip issue
  • Loading branch information
bsvensson committed Apr 11, 2014
2 parents 38ee7d4 + da29440 commit f494df3
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions PHP/proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit f494df3

Please sign in to comment.