XMLHttpRequest changes for Gecko1.8

  • Revision slug: XMLHttpRequest_changes_for_Gecko1.8
  • Revision title: XMLHttpRequest changes for Gecko1.8
  • Revision id: 172991
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment fix categories

Revision Content

This document describes some of the changes that have been made to Gecko's XMLHttpRequest implementation since version 1.7 (i.e., the version of Gecko that shipped with Firefox 1.0). These changes only apply to XUL extensions and XUL applications. They do not apply to web applications.

Changes to XMLHttpRequest.send

If you pass a nsIInputStream instance to the send method, then it must no longer include <tt>Content-Length</tt> and <tt>Content-Type</tt> headers at the beginning of the stream. Instead, the <tt>Content-Length</tt> header will be inferred from the length of the stream, and the <tt>Content-Type</tt> header must be specified manually by calling the setRequestHeader method. These requirements are more fully described in nsIXMLHttpRequest.idl.

Changes to XMLHttpRequest.onreadystatechange

This attribute now has a type of nsIOnReadyStateChangeHandler instead of nsIOnReadystatechangehandler.

Revision Source

<p>This document describes some of the changes that have been made to <a href="en/Gecko">Gecko</a>'s
<a href="en/XMLHttpRequest">XMLHttpRequest</a> implementation since version 1.7 (i.e., the version of 
Gecko that shipped with Firefox 1.0).  These changes only apply to XUL extensions
and XUL applications.  They do not apply to web applications.
</p>
<h3 name="Changes_to_XMLHttpRequest.send"> Changes to XMLHttpRequest.send </h3>
<p>If you pass a <a href="en/NsIInputStream">nsIInputStream</a> instance to the <code>send</code> method, then it must no longer include <tt>Content-Length</tt> and <tt>Content-Type</tt> headers at the beginning of the stream.  Instead, the <tt>Content-Length</tt> header will be inferred from the length of the stream, and the <tt>Content-Type</tt> header must be specified manually by calling the <code>setRequestHeader</code> method.  These requirements are more fully described in <a class="external" href="http://lxr.mozilla.org/mozilla1.8/source/extensions/xmlextras/base/public/nsIXMLHttpRequest.idl#213">nsIXMLHttpRequest.idl</a>.
</p>
<h3 name="Changes_to_XMLHttpRequest.onreadystatechange"> Changes to XMLHttpRequest.onreadystatechange </h3>
<p>This attribute now has a type of <code>nsIOnReadyStateChangeHandler</code> instead of
<code>nsIOnReadystatechangehandler</code>.
</p>
Revert to this revision