MDL-57161 search: Set the correct HTTP header
[moodle.git] / search / engine / solr / classes / engine.php
index 57fef71..50042c3 100644 (file)
@@ -1224,7 +1224,7 @@ class engine extends \core_search\engine {
 
         if (!empty($this->config->server_username) && !empty($this->config->server_password)) {
             $authorization = $this->config->server_username . ':' . $this->config->server_password;
-            $this->curl->setHeader('Authorization', 'Basic ' . base64_encode($authorization));
+            $this->curl->setHeader('AuthorizationBasic ' . base64_encode($authorization));
         }
 
         return $this->curl;