Connection Manager Release Notes

*** version 2.6.0 ***

* setForm optimization for select-one elements.

* File upload transactions that include encoded POST data will have the keys and
values decoded before they are used to create the form fields, to avoid having
the data encoded twice.

*** version 2.5.2 ***

* In file upload transactions, in Safari 3.x, fail to send the file data.  This
is due to Safari evaluating the condition statement "if(formObject.encoding){}"
as true.  This results in the incorrect attribute being set, the correct
attribute being "enctype."  The conditional check now explicitly verifies for
IE, before setting the appropriate attribute.

* NOTE: File uploads using setForm() does not function as expected in Opera
9.27.  The file and data upload phase works as expected, however the server
response cannot be read.  Specifically, "onload" for an iframe is triggered when
the iframe is appended into the DOM.  This results in the upload callback being
fired immediately, before the transaction is complete, and before the response
data are available.

This condition is documented in Opera's bug tracking system: 295719 and appears
to have been fixed as of Opera 9.50 b2.

*** version 2.5.1 ***

* no changes.

*** version 2.5.0 ***

* setForm() can now detects HTTPS in the URI for file upload transactions.  The
third, boolean argument for HTTPS when using IE is no longer necessary.

* [FIXED] SF1882101.  POST transactions without a message will now have a
Content-Length value set to 0 for FF 2.x.  This is accomplished by passing a
value of empty string instead of null to XHR's send().  All other A-Grade
browsers remain unaffected and perform correctly.

*** version 2.4.0 ***

* [FIXED] SF1804153.  Transactions initialized with setForm() now properly clear
the POST data field after each transaction.

* The callback object can accept a new member, cache, defined with a boolean
value.  If set to false (e.g., var callback = { cache:false };), a timestamp
will be appended to the URI to override HTTP GET caching.  This timestamp value
will appear as rnd=timestamp in the request querystring.

* Custom Events startEvent, completeEvent, and abortEvent now receive
callback.argument, if defined, in addition to the transaction ID.  Each Custom
Event's function handler receives two arguments -- the event type as the first
argument, and an array as the second argument.  The first element in the array
is the transaction ID, and the second element are any arguments defined in the
callback object.

*** version 2.3.1 ***

* setDefaultPostHeader() can now be overloaded with a boolean, string, or
number.  By default, POST transactions send the following Content-Type header:
'application/x-www-form-urlencoded; charset=UTF-8'.

A custom Content-Type header can now be set by passing its value to
setDefaultPostHeader().

* HTML form submissions now send a Content-Type header of "application/x-www-
form-urlencoded", omitting the charset=UTF-8 value.

* setDefaultXhrHeader() can now be overloaded with a boolean, string, or number.
By default, all transactions send a custom header of "X-Requested-
With:XMLHttpRequest".

This default header value can be overridden by passing the desired value as an
argument to setDefaultPostHeader().

* The file upload iframe's event listener is now explicitly removed before the
iframe is destroyed.

*** version 2.3.0 ***

* Custom Events are introduced in Connection Manager.  These events -- for a
non-file upload transaction -- are:

   * startEvent
   * completeEvent
   * successEvent
   * failureEvent
   * abortEvent

For transactions involving file upload with an HTML form, the events are:

   * startEvent
   * completeEvent
   * uploadEvent
   * abortEvent

* Event utility is a now Connection Manager dependency.

* abort() and isCallInProgress() are now functional for file upload
transactions.

* NOTE: The native XHR implementation in Safari 2.0.4 has been confirmed to leak
memory.

* UPDATE: The XHR implementation in Safari 3.0 beta(and WebKit builds) now
appear to handle HTTP 204 responses correctly.  XHR in Opera, as of 9.21, still
does not produce a valid HTTP status code with an HTTP 204 response.

*** version 2.2.2 ***

* No revisions.

*** version 2.2.1 ***

* setForm() will include the correct name-value of the HTML Submit button
clicked where multiple HTML Submit button options are present in an HTML form.
To enable this feature, include the Event utility source file as a dependency
before the Connection Manager source file.

* The XHR implementation in IE6 and IE7, Opera, and Safari do not properly
handle an HTTP 204 response.  IE6/7 will instead return a Win error 1223.
handleTransactionResponse() will treat 1223 as an HTTP 204, and route the
response appropriately to the success callback.  createResponseObject() will
normalize the response object's status and statusText values to 204 and "No
Content" respectively.  However, no headers are returned.

Opera and Safari provide no discernable response with HTTP 204(e.g., response
object's properties are undefined).  This response will trigger the failure
callback with a status of 0 and statusText of "communication failure".

*** version 2.2.0 ***

* initHeader() now accepts a third argument as a boolean.  When set to true,
this specific header will automatically be sent with each transaction.
Otherwise, the header will be set and sent for the specific transaction only.
Example: initHeader('X-YUI-State','Beta', true); all transactions will send this
header.
   * resetDefaultHeaders() will clear the default headers collection.

* All Connection Mananger transactions will broadcast the header: "X-Requested-
With: XMLHttpRequest".
   * This can be turned off: YAHOO.util.Connect.setDefaultXhrHeader(false);

* The HTTP method argument in asyncRequest is now case-insensitive.

* uploadFile() will now correctly handle the absence of a callback object,
allowing the transaction to complete silently.

*** version 0.12.2 ***

* The Opera/Connection Manager concurrent object condition, described in version
0.12.0, no longer tests applies for Opera, version 9.10.

*** version 0.12.1 ***

* connection-debug.js corrected and synchronized with connection.js.  Code
inconsistencies between the two files existed in 0.12.0.

*** version 0.12.0 ***

* When uploading files via setForm() and asyncRequest includes a POST data
argument, appendPostData() will create hidden input fields for each postData
label/value and append each field to the form object.

* setForm() returns the assembled label/value string of the parsed HTML form
fields.

* NOTE: Opera 9.02 does not allow for more than 12 concurrent Connection Manager
objects.

The following example creates 12 requests in a loop:
for(var n=0; n<=12; i++){
  conn[n] = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
}

If n > 13, Opera 9.02 will crash.  Connection manager objects count n must be <=
12 at all times.  This condition was not present in Opera version 9.01.

This condition does not apply to other A-Grade browsers (
http://developer.yahoo.com/yui/articles/gbs/gbs_browser-chart.html)

*** version 0.11.3 ***

* YUI Event dependency for file uploading is now optional.

* uploadFile() now sets unique IDs for each file upload transaction to prevent
iframe collisions with parallel uploads.

* The callback object now has property responseXML to provide support for file
upload transactions that return an XML document.

* setForm() will verify if a select option value attribute is present and use
its value, including empty string, before using the text node value.

* Modified polling mechanism in handleReadyState() and
handleTransactionResponse() to prevent infinite polling if JavaScript errors
occur in the user-defined callback.

* createFrame() will now accept a boolean argument of true to set the frame
source to "javascript:false" to prevent IE from throwing security warnings in an
HTTPS environment.

* setHeader() now enumerates through the _http_header object using
hasOwnProperty() to prevent collisions with members added to Object via
prototype.

* If using setForm() and asyncRequest includes a POST data argument, the data
will be concatenated to the HTML form POST message.

*** version 0.11.2 ***

* No revisions.

*** version 0.11.1 ***

* uploadFile() now verifies the existence of callback.upload before invoking
callback, with or without object scope.

*** version 0.11.0 ***

* Each transaction can be defined with a timeout threshold, in milliseconds,
through the callback object.  If the threshold is reached, and the transaction
hasn't yet completed, the transaction will call abort().

* abort() will now accept a callback object as the second argument.  The
failure callback will receive a response object to indicate the transaction was
aborted.

* setForm() will now support file uploads by setting the second argument to
true (e.g., YAHOO.util.Connect.setForm(formObject, true).  File upload does not
use the callback success or failure handler.  Instead, it uses a new callback
object handler: upload.

* HTML form submit will no longer submit form fields without a defined name
attribute.

* The default POST header of 'Content-Type','application/x-www-form-urlencoded'
can be overridden by calling setDefaultPostHeader(false).  This
will remove the default header from non-HTML form, POST submissions.

* setHeader() now enumerates through the _http_header object with
propertyIsEnumerable to prevent collisions with members added to Object via
prototype.

*** version 0.10.0 ***

* handleTransactionResponse() now treats the full HTTP 2xx range as a success
case, instead of just HTTP 200.

* To accommodate multiple field values in Mozilla/Firefox, multiple initHeader
calls with the same label will now result in the values concatenated to a
comma- delimited string value.
Example:
Setting Content-Type:'application/x-www-form-urlencoded' and Content-
Type:'text/xml' will result in Content-Type:'application/x-www-form-urlencoded,
text/xml'.

* Default polling interval lowered to 50ms.

* YAHOO.util.Connect.setPollingInterval() will allow you to set a polling
interval -- in milliseconds -- to override the default value.

* YAHOO.util.Connect.getResponseHeader[headerLabel] now supported as a response
object property to provide symmetry with the native XHR object's property.
Example:
YAHOO.util.Connect.getResponseHeader['Content-Length'] will return the value
for the Content-Length header, if the header is available.

* YAHOO.util.Connect.allResponseHeaders property renamed to
getAllResponseHeaders to provide symmetry with the native XHR object's
property.

* YAHOO.util.Connect.setForm() now supports HTTP GET as well as HTTP POST.

* YAHOO.util.Connect.setForm() now accepts an HTML form object as well as its
name attribute value.

* YAHOO.util.Connect.setForm() will not submit HTML form fields that are
disabled or do not have a name attribute value.

* [FIXED] Response exceptions result in infinite callback loop in
Mozilla/Firefox.

* [FIXED] YAHOO.util.Connect.abort() now properly clears polling interval.

* [FIXED] isCallInProgress() now verifies whether XHR instance still exists,
and returns false if the connection object is no longer available.

*** version 0.9.0 ***

* Initial release








