<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>71985</bug_id>
          
          <creation_ts>2011-11-09 18:08:37 -0800</creation_ts>
          <short_desc>XMLHttpRequest: multiple open() do not trigger multiple readystatechange events</short_desc>
          <delta_ts>2013-02-11 14:19:32 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>XML</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>46012</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Deqing Huang">deqing.huang</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>jchaffraix</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>499558</commentid>
    <comment_count>0</comment_count>
    <who name="Deqing Huang">deqing.huang</who>
    <bug_when>2011-11-09 18:08:37 -0800</bug_when>
    <thetext>According to the XHR spec, a readystatechange event should be fired after the open() method is invoked.

But when invoking open() for multiple times, the readystatechange event is seen only once.

TEST: http://tc.labs.opera.com/apis/XMLHttpRequest/open-open-send.htm

This test case passes in FireFox7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>499712</commentid>
    <comment_count>1</comment_count>
    <who name="Deqing Huang">deqing.huang</who>
    <bug_when>2011-11-10 00:44:22 -0800</bug_when>
    <thetext>Checking WebCore code I found following comments in XMLHttpRequest::open()

    // Check previous state to avoid dispatching readyState event
    // when calling open several times in a row.

So apparently this behavior is designed deliberately.

Question is, does it conform to the XHR spec?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>500064</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-11-10 11:18:09 -0800</bug_when>
    <thetext>Per bug 17481, all browsers used to not dispatch the event in this case. Sounds like this could be a mistake in the spec that Firefox picked up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>500475</commentid>
    <comment_count>3</comment_count>
    <who name="Deqing Huang">deqing.huang</who>
    <bug_when>2011-11-10 19:05:33 -0800</bug_when>
    <thetext>Ok, that sounds good to me. I will see if the test case should be updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>500498</commentid>
    <comment_count>4</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2011-11-10 21:11:17 -0800</bug_when>
    <thetext>It looks like the behavior of FF (we need to see the other browsers) has changed since the code was written. We did not get the spec updated at the time so more investigation needs to go in before closing this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>830120</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2013-02-11 14:19:32 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 46012 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>