Title: [196072] trunk/Source/WebKit2
Revision
196072
Author
[email protected]
Date
2016-02-03 10:58:46 -0800 (Wed, 03 Feb 2016)

Log Message

Use proposed credentials in authentication challenges with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=153811

Reviewed by Darin Adler.

This fixes http/tests/xmlhttprequest/basic-auth-default.html

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
Use the proposed credential if there is one.  This matches behavior in
ResourceHandle::tryHandlePasswordBasedAuthentication.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (196071 => 196072)


--- trunk/Source/WebKit2/ChangeLog	2016-02-03 18:21:01 UTC (rev 196071)
+++ trunk/Source/WebKit2/ChangeLog	2016-02-03 18:58:46 UTC (rev 196072)
@@ -1,3 +1,17 @@
+2016-02-02  Alex Christensen  <[email protected]>
+
+        Use proposed credentials in authentication challenges with NetworkSession
+        https://bugs.webkit.org/show_bug.cgi?id=153811
+
+        Reviewed by Darin Adler.
+
+        This fixes http/tests/xmlhttprequest/basic-auth-default.html
+
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
+        Use the proposed credential if there is one.  This matches behavior in
+        ResourceHandle::tryHandlePasswordBasedAuthentication.
+
 2016-02-03  Jessie Berlin  <[email protected]>
 
         Build fix.

Modified: trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm (196071 => 196072)


--- trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2016-02-03 18:21:01 UTC (rev 196071)
+++ trunk/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2016-02-03 18:58:46 UTC (rev 196072)
@@ -312,6 +312,11 @@
         m_password = String();
         return true;
     }
+    
+    if (!challenge.proposedCredential().isEmpty() && !challenge.previousFailureCount()) {
+        completionHandler(AuthenticationChallengeDisposition::UseCredential, challenge.proposedCredential());
+        return true;
+    }
 
     return false;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to