WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/01/2020 02:24:42 PM (18 months ago)
Author:
desrosj
Message:

External Libraries: Update the SimplePie library to the latest version (1.5.5).

This brings SimplePie in sync with the most up to date version, 1.5.5.

This update brings many bug fixes, small enhancements, and PHP compatibility fixes for newer versions of PHP.

For a full list of changes, see https://github.com/simplepie/simplepie/blob/master/CHANGELOG.md#155-may-1-2020.

Props dshanske, slushman, etruel, wpshades, dmenard, desrosj, hareesh-pillai, stevenkword, jrf, Ipstenu, johnbillion.
Fixes #36669.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/SimplePie/HTTP/Parser.php

    r22798 r47733  
    66 * Takes the hard work out of managing a complete RSS/Atom solution.
    77 *
    8  * Copyright (c) 2004-2012, Ryan Parman, Geoffrey Sneddon, Ryan McCue, and contributors
     8 * Copyright (c) 2004-2016, Ryan Parman, Sam Sneddon, Ryan McCue, and contributors
    99 * All rights reserved.
    1010 *
     
    3434 *
    3535 * @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
    3837 * @author Ryan Parman
    39  * @author Geoffrey Sneddon
     38 * @author Sam Sneddon
    4039 * @author Ryan McCue
    4140 * @link http://simplepie.org/ SimplePie
     
    157156            return true;
    158157        }
    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;
    168165    }
    169166
     
    498495        }
    499496    }
     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    }
    500518}
Note: See TracChangeset for help on using the changeset viewer.