Change HttpRequestFactory default to guzzle
authorBill Pirkle <bpirkle@wikimedia.org>
Wed, 6 Feb 2019 16:29:52 +0000 (10:29 -0600)
committerKrinkle <krinklemail@gmail.com>
Fri, 8 Feb 2019 01:14:53 +0000 (01:14 +0000)
Activate the changes from T212175 by changing the default
MWHttpRequest-derived type to guzzle.  This is being done
as a separate change so that it is conveniently revertable
if issues arise.

Bug: T214703
Change-Id: I0868d2e7f3eed6d7c6b15334eb3187f3edcd7bec

includes/http/HttpRequestFactory.php

index 0faef17..a3a14d0 100644 (file)
@@ -44,7 +44,7 @@ class HttpRequestFactory {
         */
        public function create( $url, array $options = [], $caller = __METHOD__ ) {
                if ( !Http::$httpEngine ) {
-                       Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
+                       Http::$httpEngine = 'guzzle';
                } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
                        throw new DomainException( __METHOD__ . ': curl (https://secure.php.net/curl) is not ' .
                           'installed, but Http::$httpEngine is set to "curl"' );