Changeset 47733 for trunk/src/wp-includes/SimplePie/HTTP/Parser.php
- Timestamp:
- 05/01/2020 02:24:42 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/SimplePie/HTTP/Parser.php
r22798 r47733 6 6 * Takes the hard work out of managing a complete RSS/Atom solution. 7 7 * 8 * Copyright (c) 2004-201 2, Ryan Parman, GeoffreySneddon, Ryan McCue, and contributors8 * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors 9 9 * All rights reserved. 10 10 * … … 34 34 * 35 35 * @package SimplePie 36 * @version 1.3.1 37 * @copyright 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue 36 * @copyright 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue 38 37 * @author Ryan Parman 39 * @author GeoffreySneddon38 * @author Sam Sneddon 40 39 * @author Ryan McCue 41 40 * @link http://simplepie.org/ SimplePie … … 157 156 return true; 158 157 } 159 else 160 { 161 $this->http_version = ''; 162 $this->status_code = ''; 163 $this->reason = ''; 164 $this->headers = array(); 165 $this->body = ''; 166 return false; 167 } 158 159 $this->http_version = ''; 160 $this->status_code = ''; 161 $this->reason = ''; 162 $this->headers = array(); 163 $this->body = ''; 164 return false; 168 165 } 169 166 … … 498 495 } 499 496 } 497 498 /** 499 * Prepare headers (take care of proxies headers) 500 * 501 * @param string $headers Raw headers 502 * @param integer $count Redirection count. Default to 1. 503 * 504 * @return string 505 */ 506 static public function prepareHeaders($headers, $count = 1) 507 { 508 $data = explode("\r\n\r\n", $headers, $count); 509 $data = array_pop($data); 510 if (false !== stripos($data, "HTTP/1.0 200 Connection established\r\n\r\n")) { 511 $data = str_ireplace("HTTP/1.0 200 Connection established\r\n\r\n", '', $data); 512 } 513 if (false !== stripos($data, "HTTP/1.1 200 Connection established\r\n\r\n")) { 514 $data = str_ireplace("HTTP/1.1 200 Connection established\r\n\r\n", '', $data); 515 } 516 return $data; 517 } 500 518 }
Note: See TracChangeset
for help on using the changeset viewer.