Title: [212291] trunk/Source/WebKit2
Revision
212291
Author
[email protected]
Date
2017-02-14 05:08:30 -0800 (Tue, 14 Feb 2017)

Log Message

Allow to use stored credentials also for downloads started by DownloadManager::startDownload
https://bugs.webkit.org/show_bug.cgi?id=167584

Reviewed by Michael Catanzaro.

Cliking on a link that triggers a download works on an already HTTP authenticated site works, but right clicking
and downloading from the context menu shows the HTTP auth dialog again. This is because PendingDownload uses
DoNotAllowStoredCredentials unconditionally. We want to allow using cached credentials at least for
non-ephemeral sessions.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (212290 => 212291)


--- trunk/Source/WebKit2/ChangeLog	2017-02-14 13:03:20 UTC (rev 212290)
+++ trunk/Source/WebKit2/ChangeLog	2017-02-14 13:08:30 UTC (rev 212291)
@@ -1,5 +1,20 @@
 2017-02-14  Carlos Garcia Campos  <[email protected]>
 
+        Allow to use stored credentials also for downloads started by DownloadManager::startDownload
+        https://bugs.webkit.org/show_bug.cgi?id=167584
+
+        Reviewed by Michael Catanzaro.
+
+        Cliking on a link that triggers a download works on an already HTTP authenticated site works, but right clicking
+        and downloading from the context menu shows the HTTP auth dialog again. This is because PendingDownload uses
+        DoNotAllowStoredCredentials unconditionally. We want to allow using cached credentials at least for
+        non-ephemeral sessions.
+
+        * NetworkProcess/Downloads/DownloadManager.cpp:
+        (WebKit::DownloadManager::startDownload):
+
+2017-02-14  Carlos Garcia Campos  <[email protected]>
+
         [GTK] Make DragImageRef a RefPtr instead of a plain pointer
         https://bugs.webkit.org/show_bug.cgi?id=168296
 

Modified: trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp (212290 => 212291)


--- trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp	2017-02-14 13:03:20 UTC (rev 212290)
+++ trunk/Source/WebKit2/NetworkProcess/Downloads/DownloadManager.cpp	2017-02-14 13:08:30 UTC (rev 212291)
@@ -58,6 +58,7 @@
     parameters.clientCredentialPolicy = ClientCredentialPolicy::MayAskClientForCredentials;
     if (request.url().protocolIsBlob() && connection)
         parameters.blobFileReferences = NetworkBlobRegistry::singleton().filesInBlob(*connection, request.url());
+    parameters.allowStoredCredentials = sessionID.isEphemeral() ? DoNotAllowStoredCredentials : AllowStoredCredentials;
 
     m_pendingDownloads.add(downloadID, std::make_unique<PendingDownload>(WTFMove(parameters), downloadID, *networkSession, suggestedName));
 #else
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to