aboutsummaryrefslogtreecommitdiffstats
path: root/lib/simplepie/library/SimplePie/HTTP/Parser.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/simplepie/library/SimplePie/HTTP/Parser.php')
-rw-r--r--lib/simplepie/library/SimplePie/HTTP/Parser.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/simplepie/library/SimplePie/HTTP/Parser.php b/lib/simplepie/library/SimplePie/HTTP/Parser.php
index 7d6188dd1..b0f0f4a8b 100644
--- a/lib/simplepie/library/SimplePie/HTTP/Parser.php
+++ b/lib/simplepie/library/SimplePie/HTTP/Parser.php
@@ -5,7 +5,7 @@
* A PHP-Based RSS and Atom Feed Framework.
* Takes the hard work out of managing a complete RSS/Atom solution.
*
- * Copyright (c) 2004-2016, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
+ * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
@@ -33,9 +33,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package SimplePie
- * @copyright 2004-2016 Ryan Parman, Geoffrey Sneddon, Ryan McCue
+ * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
* @author Ryan Parman
- * @author Geoffrey Sneddon
+ * @author Sam Sneddon
* @author Ryan McCue
* @link http://simplepie.org/ SimplePie
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
@@ -507,12 +507,16 @@ class SimplePie_HTTP_Parser
{
$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);
+ if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n")) {
+ $exploded = explode("\r\n\r\n", $data, 2);
+ $data = end($exploded);
}
- if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n\r\n")) {
- $data = str_ireplace("HTTP/1.1 200 Connection established\r\n\r\n", '', $data);
+ if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n")) {
+ $exploded = explode("\r\n\r\n", $data, 2);
+ $data = end($exploded);
}
return $data;
}
}
+
+class_alias('SimplePie_HTTP_Parser', 'SimplePie\HTTP\Parser', false);