WebCore:
commit5bc1c74eb1e6672f336af704f1577d761a8560d5
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2008 23:39:14 +0000 (15 23:39 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2008 23:39:14 +0000 (15 23:39 +0000)
treebfc64c016a8305b1978dc12cf5e4eb4786330ac1
parent9e425088ea33f5b59ff40784e3ec5e4c1d65b318
WebCore:

        Reviewed by Anders Carlsson.

        Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
        surveys no longer work due to XMLHttpRequest exceptions

        Reverted some exception throwing code from r12194.

        To comply with the W3C draft spec, we used to throw an exception when
        trying to access responseText and responseXML at the wrong time, but
        that turned out to be a compatibility problem.

        Now, matching Firefox and previous versions of WebKit, we never throw
        an exception when accessing responseText or responseXML.

        See http://www.mail-archive.com/public-webapi@w3.org/msg02756.html.

        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::getResponseText):
        (WebCore::XMLHttpRequest::getResponseXML):

LayoutTests:

        Reviewed by Anders Carlsson.

        Fixed <rdar://problem/5725429> REGRESSION (r27898): Greenfield online
        surveys no longer work due to XMLHttpRequest exceptions

        Updated layout tests to expect an exception not to be thrown.

        * http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html:
        * http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html:
        * http/tests/xmlhttprequest/zero-length-response-expected.txt:
        * http/tests/xmlhttprequest/zero-length-response-sync-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-responseText-exception.html
LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-responseXML-exception.html
LayoutTests/http/tests/xmlhttprequest/zero-length-response-expected.txt
LayoutTests/http/tests/xmlhttprequest/zero-length-response-sync-expected.txt
WebCore/ChangeLog
WebCore/xml/XMLHttpRequest.cpp