Make WordPress Core


Ignore:
Timestamp:
05/11/2021 07:40:41 PM (4 years ago)
Author:
desrosj
Message:

External Libraries: Update the Requests library to version 1.8.0.

While some of the changes in the 1.8.0 release have already been copied to WordPress Core in earlier releases (see [38727], [46258], [47902] and [49382]), this release contains additional improvements, including:

  • A significant performance fix when using cURL.
  • Improved compliance with RFC2616.

The library has also been moved under the WordPress project’s GitHub organization and can now be found at https://github.com/WordPress/Requests.

Props jrf, dd32, rmccue, justinahinon, netweb, schlessera, TimothyBJacobs, soulseekah, ozh, skithund, carlalexander, travisnorthcutt, desrosj.
Fixes #53101.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/Requests/Proxy/HTTP.php

    r46586 r50842  
    6060        }
    6161        elseif (is_array($args)) {
    62             if (count($args) == 1) {
     62            if (count($args) === 1) {
    6363                list($this->proxy) = $args;
    6464            }
    65             elseif (count($args) == 3) {
     65            elseif (count($args) === 3) {
    6666                list($this->proxy, $this->user, $this->pass) = $args;
    67                 $this->use_authentication = true;
     67                $this->use_authentication                    = true;
    6868            }
    6969            else {
     
    8383     * @param Requests_Hooks $hooks Hook system
    8484     */
    85     public function register(Requests_Hooks &$hooks) {
    86         $hooks->register('curl.before_send', array(&$this, 'curl_before_send'));
     85    public function register(Requests_Hooks $hooks) {
     86        $hooks->register('curl.before_send', array($this, 'curl_before_send'));
    8787
    88         $hooks->register('fsockopen.remote_socket', array(&$this, 'fsockopen_remote_socket'));
    89         $hooks->register('fsockopen.remote_host_path', array(&$this, 'fsockopen_remote_host_path'));
     88        $hooks->register('fsockopen.remote_socket', array($this, 'fsockopen_remote_socket'));
     89        $hooks->register('fsockopen.remote_host_path', array($this, 'fsockopen_remote_host_path'));
    9090        if ($this->use_authentication) {
    91             $hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header'));
     91            $hooks->register('fsockopen.after_headers', array($this, 'fsockopen_header'));
    9292        }
    9393    }
Note: See TracChangeset for help on using the changeset viewer.