Changeset 103661 in webkit


Ignore:
Timestamp:
Dec 24, 2011, 12:29:30 PM (14 years ago)
Author:
[email protected]
Message:

Allow XMLHttpRequest withCredentials to be set prior to a call to open()
https://bugs.webkit.org/show_bug.cgi?id=75194

Source/WebCore:

XMLHttpRequest.withCredentials attribute should be modifiable prior to the OPENED state per
the W3C spec. See http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-withcredentials-attribute

Reviewed by Alexey Proskuryakov.

Test: fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::setWithCredentials):
Prevent setting the value only after the OPENED state.

LayoutTests:

Reviewed by Alexey Proskuryakov.

  • fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open-expected.txt: Added.
  • fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html: Added.

Validate that XMLHttpRequest.withCredentials can be set prior to a call to open().

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r103657 r103661  
     12011-12-24  Jarred Nicholls  <[email protected]>
     2
     3        Allow XMLHttpRequest withCredentials to be set prior to a call to open()
     4        https://bugs.webkit.org/show_bug.cgi?id=75194
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open-expected.txt: Added.
     9        * fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html: Added.
     10        Validate that XMLHttpRequest.withCredentials can be set prior to a call to open().
     11
    1122011-12-24  Ryosuke Niwa  <[email protected]>
    213
  • trunk/Source/WebCore/ChangeLog

    r103660 r103661  
     12011-12-24  Jarred Nicholls  <[email protected]>
     2
     3        Allow XMLHttpRequest withCredentials to be set prior to a call to open()
     4        https://bugs.webkit.org/show_bug.cgi?id=75194
     5
     6        XMLHttpRequest.withCredentials attribute should be modifiable prior to the OPENED state per
     7        the W3C spec. See http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#the-withcredentials-attribute
     8
     9        Reviewed by Alexey Proskuryakov.
     10
     11        Test: fast/xmlhttprequest/xmlhttprequest-withcredentials-before-open.html
     12
     13        * xml/XMLHttpRequest.cpp:
     14        (WebCore::XMLHttpRequest::setWithCredentials):
     15        Prevent setting the value only after the OPENED state.
     16
    1172011-12-24  Andreas Kling  <[email protected]>
    218
  • trunk/Source/WebCore/xml/XMLHttpRequest.cpp

    r103629 r103661  
    378378void XMLHttpRequest::setWithCredentials(bool value, ExceptionCode& ec)
    379379{
    380     if (m_state != OPENED || m_loader) {
     380    if (m_state > OPENED || m_loader) {
    381381        ec = INVALID_STATE_ERR;
    382382        return;
Note: See TracChangeset for help on using the changeset viewer.