Title: [116308] trunk
Revision
116308
Author
[email protected]
Date
2012-05-07 07:32:32 -0700 (Mon, 07 May 2012)

Log Message

[BlackBerry] WWW-Authenticate header on 200 response pops up authentication dialog
https://bugs.webkit.org/show_bug.cgi?id=85643

Patch by Liam Quinn <[email protected]> on 2012-05-07
Reviewed by George Staikos.

.:

RIM PR: 151992
Added manual test for WWW-Authenticate header on a 200 response.

* ManualTests/blackberry/http-auth-on-200.php: Added.

Source/WebCore:

RIM PR: 151992
Ignore WWW-Authenticate header if the response code is not 401.
Ignore Proxy-Authenticate header if the response code is not 407.

Manual test added to observe whether the authentication dialog appears on a 200 response with WWW-Authenticate.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::handleNotifyHeaderReceived):

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (116307 => 116308)


--- trunk/ChangeLog	2012-05-07 14:10:34 UTC (rev 116307)
+++ trunk/ChangeLog	2012-05-07 14:32:32 UTC (rev 116308)
@@ -1,3 +1,15 @@
+2012-05-07  Liam Quinn  <[email protected]>
+
+        [BlackBerry] WWW-Authenticate header on 200 response pops up authentication dialog
+        https://bugs.webkit.org/show_bug.cgi?id=85643
+
+        Reviewed by George Staikos.
+
+        RIM PR: 151992
+        Added manual test for WWW-Authenticate header on a 200 response.
+
+        * ManualTests/blackberry/http-auth-on-200.php: Added.
+
 2012-05-07  Simon Hausmann  <[email protected]>
 
         [Qt] Unreviewed trivial build fix: Don't include bytearraytestdata.h in the QtWebKit

Added: trunk/ManualTests/blackberry/http-auth-on-200.php (0 => 116308)


--- trunk/ManualTests/blackberry/http-auth-on-200.php	                        (rev 0)
+++ trunk/ManualTests/blackberry/http-auth-on-200.php	2012-05-07 14:32:32 UTC (rev 116308)
@@ -0,0 +1,6 @@
+<?php
+  header('WWW-Authenticate: Basic realm="FAIL"');
+  header('HTTP/1.0 200 OK');
+  header('Content-Type: text/plain');
+  echo 'PASS if you did not see an authentication dialog';
+?>

Modified: trunk/Source/WebCore/ChangeLog (116307 => 116308)


--- trunk/Source/WebCore/ChangeLog	2012-05-07 14:10:34 UTC (rev 116307)
+++ trunk/Source/WebCore/ChangeLog	2012-05-07 14:32:32 UTC (rev 116308)
@@ -1,3 +1,19 @@
+2012-05-07  Liam Quinn  <[email protected]>
+
+        [BlackBerry] WWW-Authenticate header on 200 response pops up authentication dialog
+        https://bugs.webkit.org/show_bug.cgi?id=85643
+
+        Reviewed by George Staikos.
+
+        RIM PR: 151992
+        Ignore WWW-Authenticate header if the response code is not 401.
+        Ignore Proxy-Authenticate header if the response code is not 407.
+
+        Manual test added to observe whether the authentication dialog appears on a 200 response with WWW-Authenticate.
+
+        * platform/network/blackberry/NetworkJob.cpp:
+        (WebCore::NetworkJob::handleNotifyHeaderReceived):
+
 2012-05-07  Alexander Pavlov  <[email protected]>
 
         Web Inspector: [TextPrompt] Event listeners and CSS style are not removed on detachment

Modified: trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp (116307 => 116308)


--- trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-05-07 14:10:34 UTC (rev 116307)
+++ trunk/Source/WebCore/platform/network/blackberry/NetworkJob.cpp	2012-05-07 14:32:32 UTC (rev 116308)
@@ -314,9 +314,9 @@
             m_response.setHTTPHeaderField(key, m_response.httpHeaderField(key) + "\r\n" + value);
             return;
         }
-    } else if (lowerKey == "www-authenticate")
+    } else if (m_extendedStatusCode == 401 && lowerKey == "www-authenticate")
         handleAuthHeader(ProtectionSpaceServerHTTP, value);
-    else if (lowerKey == "proxy-authenticate" && !BlackBerry::Platform::Client::get()->getProxyAddress().empty())
+    else if (m_extendedStatusCode == 407 && lowerKey == "proxy-authenticate" && !BlackBerry::Platform::Client::get()->getProxyAddress().empty())
         handleAuthHeader(ProtectionSpaceProxyHTTP, value);
     else if (equalIgnoringCase(key, BlackBerry::Platform::NetworkRequest::HEADER_BLACKBERRY_FTP))
         handleFTPHeader(value);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to