malliaridis commented on code in PR #3754:
URL: https://github.com/apache/solr/pull/3754#discussion_r2807771557


##########
solr/ui/src/commonMain/kotlin/org/apache/solr/ui/components/start/integration/HttpStartStoreClient.kt:
##########
@@ -91,11 +98,36 @@ class HttpStartStoreClient(
             // Split by comma, as there is the chance that headers will be 
merged and separated by
             // comma (e.g. on web target)
             .flatMap { header -> header.split(",") }
-            .map { authHeader ->
+            .map(String::trim)
+            .mapIndexed { index, authHeader ->
                 val (scheme, params) = parseWwwAuthenticate(authHeader)
 
                 when (scheme.lowercase()) {
                     "basic", "xbasic" -> AuthMethod.BasicAuthMethod(realm = 
params["realm"])

Review Comment:
   The `xbasic` is actually a workaround used in many application, so it is not 
just a Solr thing. If we use `basic` as scheme, the browser is displaying a 
credentials prompt automatically before rendering the site, and this prompt is 
not customizable. Therefore, many applications provide an `xbasic` scheme to 
work around this default behavior of browsers.
   
   _From Gemini_
   > Basic authentication is an HTTP protocol mechanism where a browser 
displays a native,, non-customizable popup dialog asking for a username and 
password. It is triggered when a server sends a 401 Unauthorized status and a 
WWW-Authenticate: Basic header.
   
   Although this is not a problem to use, it is a less appealing application 
behavior.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to