Merge "Remove various references to cURL in code comments"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 7 Mar 2019 10:39:22 +0000 (10:39 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 7 Mar 2019 10:39:22 +0000 (10:39 +0000)
includes/clientpool/SquidPurgeClient.php
includes/http/Http.php
includes/specials/SpecialUploadStash.php

index 005b326..49d9d1c 100644 (file)
@@ -25,7 +25,7 @@
  * Uses asynchronous I/O, allowing purges to be done in a highly parallel
  * manner.
  *
- * Could be replaced by curl_multi_exec() or some such.
+ * @todo Consider using MultiHttpClient.
  */
 class SquidPurgeClient {
        /** @var string */
index c29f199..f0972dc 100644 (file)
@@ -132,11 +132,14 @@ class Http {
        }
 
        /**
-        * Checks that the given URI is a valid one. Hardcoding the
-        * protocols, because we only want protocols that both cURL
-        * and php support.
+        * Check that the given URI is a valid one.
         *
-        * file:// should not be allowed here for security purpose (r67684)
+        * This hardcodes a small set of protocols only, because we want to
+        * deterministically reject protocols not supported by all HTTP-transport
+        * methods.
+        *
+        * "file://" specifically must not be allowed, for security purpose
+        * (see <https://www.mediawiki.org/wiki/Special:Code/MediaWiki/r67684>).
         *
         * @todo FIXME this is wildly inaccurate and fails to actually check most stuff
         *
index abd3e07..4d0c20c 100644 (file)
@@ -261,7 +261,8 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                $scalerThumbUrl = $scalerBaseUrl . '/' . $file->getUrlRel() .
                        '/' . rawurlencode( $scalerThumbName );
 
-               // make a curl call to the scaler to create a thumbnail
+               // make an http request based on wgUploadStashScalerBaseUrl to lazy-create
+               // a thumbnail
                $httpOptions = [
                        'method' => 'GET',
                        'timeout' => 5 // T90599 attempt to time out cleanly