Make WordPress Core


Ignore:
Timestamp:
10/05/2016 03:26:37 AM (7 years ago)
Author:
dd32
Message:

HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues.

Merges [38727] to the 4.6 branch.

Fixes #38070, #37733 by reverting part of [38429] and using the fix in Requests.
Fixes #37992 allowing for connecting to SSL resources on ports other than 443.
Fixes #37991 by not sending default ports in the Host: header.
Fixes #37839 to match and decode Chunked responses correctly.
Fixes #38232 allowing a SSL connection to ignore the hostname of the certificate when verification is disabled.

Location:
branches/4.6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.6

  • branches/4.6/src/wp-includes/Requests/Transport/fsockopen.php

    r38049 r38728  
    7171        if (isset($url_parts['scheme']) && strtolower($url_parts['scheme']) === 'https') {
    7272            $remote_socket = 'ssl://' . $host;
    73             $url_parts['port'] = 443;
     73            if (!isset($url_parts['port'])) {
     74                $url_parts['port'] = 443;
     75            }
    7476
    7577            $context_options = array(
     
    98100
    99101            if (isset($options['verifyname']) && $options['verifyname'] === false) {
     102                $context_options['verify_peer_name'] = false;
    100103                $verifyname = false;
    101104            }
     
    172175            $out .= sprintf('Host: %s', $url_parts['host']);
    173176
    174             if ($url_parts['port'] !== 80) {
     177            if (( 'http' === strtolower($url_parts['scheme']) && $url_parts['port'] !== 80 ) || ( 'https' === strtolower($url_parts['scheme']) && $url_parts['port'] !== 443 )) {
    175178                $out .= ':' . $url_parts['port'];
    176179            }
Note: See TracChangeset for help on using the changeset viewer.