Chrisludt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/322618

Change subject: Add "Basic " to Authorization header
......................................................................

Add "Basic " to Authorization header

Change-Id: I54472e9c428be80db36c87ae597ea090b9a219be
---
M includes/http/Http.php
M includes/http/MWHttpRequest.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/322618/2

diff --git a/includes/http/Http.php b/includes/http/Http.php
index b418d30..133d420 100644
--- a/includes/http/Http.php
+++ b/includes/http/Http.php
@@ -52,7 +52,7 @@
         *                          MediaWiki/$wgVersion
         *    - logger              A \Psr\Logger\LoggerInterface instance for 
debug logging
         *    - username            Username for HTTP Basic Authentication
-        *    - password            Password for HTTP basic Authentication
+        *    - password            Password for HTTP Basic Authentication
         * @param string $caller The method making this request, for profiling
         * @return string|bool (bool)false on failure or a string on success
         */
diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php
index 318a7be..afbeaa0 100644
--- a/includes/http/MWHttpRequest.php
+++ b/includes/http/MWHttpRequest.php
@@ -117,7 +117,7 @@
                        $this->setUserAgent( $options['userAgent'] );
                }
                if ( isset( $options['username'] ) && isset( 
$options['password'] ) ) {
-                       $this->setHeader( 'Authorization', base64_encode( 
$options['username'] . ':' . $options['password'] ) );
+                       $this->setHeader( 'Authorization', 'Basic ' . 
base64_encode( $options['username'] . ':' . $options['password'] ) );
                 }
 
                $members = [ "postData", "proxy", "noProxy", "sslVerifyHost", 
"caInfo",

-- 
To view, visit https://gerrit.wikimedia.org/r/322618
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54472e9c428be80db36c87ae597ea090b9a219be
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Chrisludt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to