Reviewed by Darin.
authoraliceli1 <aliceli1@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Oct 2006 23:16:36 +0000 (23:16 +0000)
committeraliceli1 <aliceli1@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Oct 2006 23:16:36 +0000 (23:16 +0000)
        Fixed <rdar://problem/4758577> REGRESSION: Business and People widgets fails to complete search query

        * xml/xmlhttprequest.cpp:
        (WebCore::XMLHttpRequest::setRequestHeader):
        removed exception set when the request is not open yet

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16794 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/xml/xmlhttprequest.cpp

index 058bc117e4bf4be1f7c334a572985231f3248a3d..331f97c3e2f047cbde4e489003735b9bd33c9e3b 100644 (file)
@@ -1,3 +1,13 @@
+2006-10-04  Alice Liu  <alice.liu@apple.com>
+
+        Reviewed by Darin.
+
+        Fixed <rdar://problem/4758577> REGRESSION: Business and People widgets fails to complete search query
+
+        * xml/xmlhttprequest.cpp:
+        (WebCore::XMLHttpRequest::setRequestHeader):
+        removed exception set when the request is not open yet
+
 2006-10-04  Anders Carlsson  <acarlsson@apple.com>
 
         Reviewed by John Sullivan.
index da5da1c5d74b0c0ee8996a67880659f166836ec4..458a47f6f15b425bdd9b8333f80b797ab1e48884 100644 (file)
@@ -384,10 +384,9 @@ void XMLHttpRequest::overrideMIMEType(const String& override)
 
 void XMLHttpRequest::setRequestHeader(const String& name, const String& value, ExceptionCode& ec)
 {
-    if (m_state != Open) {
-        ec = INVALID_STATE_ERR;
+    if (m_state != Open)
+        // rdar 4758577: XHR spec says an exception should be thrown here.  However, doing so breaks the Business and People widgets.
         return;
-    }
 
     if (m_requestHeaders.length() > 0)
         m_requestHeaders += "\r\n";