Manual merge upstream SimplePie

This commit is contained in:
Alexandre Alapetite
2017-05-28 02:02:21 +02:00
parent b49bd3f337
commit dd65cb0f9c
11 changed files with 582 additions and 204 deletions

View File

@@ -496,4 +496,22 @@ class SimplePie_HTTP_Parser
}
}
}
/**
* Prepare headers (take care of proxies headers)
*
* @param string $headers Raw headers
* @param integer $count Redirection count. Default to 1.
*
* @return string
*/
static public function prepareHeaders($headers, $count = 1)
{
$data = explode("\r\n\r\n", $headers, $count);
$data = array_pop($data);
if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n\r\n")) {
$data = str_ireplace("HTTP/1.0 200 Connection established\r\n\r\n", '', $data);
}
return $data;
}
}