Temporarily remove guzzle as default for HttpRequestFactory
authorBill Pirkle <bpirkle@wikimedia.org>
Thu, 13 Dec 2018 17:02:09 +0000 (11:02 -0600)
committerBill Pirkle <bpirkle@wikimedia.org>
Thu, 13 Dec 2018 17:02:09 +0000 (11:02 -0600)
Temporarily switching back to curl/php as the default for
HttpRequest objects, to resolve production issues until a
long-term fix for the out-of-memory issue from T211886 is implemented.

Bug: T211886
Change-Id: I6201ac1292b41f82d920a431376d791a666355e8

includes/http/HttpRequestFactory.php

index a3a14d0..0faef17 100644 (file)
@@ -44,7 +44,7 @@ class HttpRequestFactory {
         */
        public function create( $url, array $options = [], $caller = __METHOD__ ) {
                if ( !Http::$httpEngine ) {
-                       Http::$httpEngine = 'guzzle';
+                       Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
                } 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"' );