Make WordPress Core


Ignore:
Timestamp:
09/27/2017 07:59:14 AM (7 years ago)
Author:
dd32
Message:

Standardise on performing api.WordPress.org requests over SSL when possible, falling back to non-SSL when appropriate.
This also standardises the User-Agent used when communicating with WordPress.org, allowing for more consistent version detection.

Fixes #42004.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r41289 r41605  
    142142
    143143    if ( false === $res ) {
     144        // include an unmodified $wp_version
     145        include( ABSPATH . WPINC . '/version.php' );
     146
    144147        $url = $http_url = 'http://api.wordpress.org/plugins/info/1.0/';
    145148        if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
     
    148151        $http_args = array(
    149152            'timeout' => 15,
     153            'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ),
    150154            'body' => array(
    151155                'action' => $action,
Note: See TracChangeset for help on using the changeset viewer.