| 1 | 601 | doc | Connection Manager Release Notes
 | 
      
        | 2 |  |  | 
 | 
      
        | 3 |  |  | *** version 2.4.1 ***
 | 
      
        | 4 |  |  | 
 | 
      
        | 5 |  |  | No change
 | 
      
        | 6 |  |  | 
 | 
      
        | 7 |  |  | *** version 2.4.0 ***
 | 
      
        | 8 |  |  | 
 | 
      
        | 9 |  |  | * [FIXED] SF1804153.  Transactions initialized with setForm() now properly clear
 | 
      
        | 10 |  |  | the POST data field after each transaction.
 | 
      
        | 11 |  |  | 
 | 
      
        | 12 |  |  | * The callback object can accept a new member, cache, defined with a boolean
 | 
      
        | 13 |  |  | value.  If set to false (e.g., var callback = { cache:false };), a timestamp
 | 
      
        | 14 |  |  | will be appended to the URI to override HTTP GET caching.  This timestamp value
 | 
      
        | 15 |  |  | will appear as rnd=timestamp in the request querystring.
 | 
      
        | 16 |  |  | 
 | 
      
        | 17 |  |  | * Custom Events startEvent, completeEvent, and abortEvent now receive
 | 
      
        | 18 |  |  | callback.argument, if defined, in addition to the transaction ID.  Each Custom
 | 
      
        | 19 |  |  | Event's function handler receives two arguments -- the event type as the first
 | 
      
        | 20 |  |  | argument, and an array as the second argument.  The first element in the array
 | 
      
        | 21 |  |  | is the transaction ID, and the second element are any arguments defined in the
 | 
      
        | 22 |  |  | callback object.
 | 
      
        | 23 |  |  | 
 | 
      
        | 24 |  |  | *** version 2.3.1 ***
 | 
      
        | 25 |  |  | 
 | 
      
        | 26 |  |  | * setDefaultPostHeader() can now be overloaded with a boolean, string, or
 | 
      
        | 27 |  |  | number.  By default, POST transactions send the following Content-Type header:
 | 
      
        | 28 |  |  | 'application/x-www-form-urlencoded; charset=UTF-8'.
 | 
      
        | 29 |  |  | 
 | 
      
        | 30 |  |  | A custom Content-Type header can now be set by passing its value to
 | 
      
        | 31 |  |  | setDefaultPostHeader().
 | 
      
        | 32 |  |  | 
 | 
      
        | 33 |  |  | * HTML form submissions now send a Content-Type header of "application/x-www-
 | 
      
        | 34 |  |  | form-urlencoded", omitting the charset=UTF-8 value.
 | 
      
        | 35 |  |  | 
 | 
      
        | 36 |  |  | * setDefaultXhrHeader() can now be overloaded with a boolean, string, or number.
 | 
      
        | 37 |  |  | By default, all transactions send a custom header of "X-Requested-
 | 
      
        | 38 |  |  | With:XMLHttpRequest".
 | 
      
        | 39 |  |  | 
 | 
      
        | 40 |  |  | This default header value can be overridden by passing the desired value as an
 | 
      
        | 41 |  |  | argument to setDefaultPostHeader().
 | 
      
        | 42 |  |  | 
 | 
      
        | 43 |  |  | * The file upload iframe's event listener is now explicitly removed before the
 | 
      
        | 44 |  |  | iframe is destroyed.
 | 
      
        | 45 |  |  | 
 | 
      
        | 46 |  |  | *** version 2.3.0 ***
 | 
      
        | 47 |  |  | 
 | 
      
        | 48 |  |  | * Custom Events are introduced in Connection Manager.  These events -- for a
 | 
      
        | 49 |  |  | non-file upload transaction -- are:
 | 
      
        | 50 |  |  | 
 | 
      
        | 51 |  |  |    * startEvent
 | 
      
        | 52 |  |  |    * completeEvent
 | 
      
        | 53 |  |  |    * successEvent
 | 
      
        | 54 |  |  |    * failureEvent
 | 
      
        | 55 |  |  |    * abortEvent
 | 
      
        | 56 |  |  | 
 | 
      
        | 57 |  |  | For transactions involving file upload with an HTML form, the events are:
 | 
      
        | 58 |  |  | 
 | 
      
        | 59 |  |  |    * startEvent
 | 
      
        | 60 |  |  |    * completeEvent
 | 
      
        | 61 |  |  |    * uploadEvent
 | 
      
        | 62 |  |  |    * abortEvent
 | 
      
        | 63 |  |  | 
 | 
      
        | 64 |  |  | * Event utility is a now Connection Manager dependency.
 | 
      
        | 65 |  |  | 
 | 
      
        | 66 |  |  | * abort() and isCallInProgress() are now functional for file upload
 | 
      
        | 67 |  |  | transactions.
 | 
      
        | 68 |  |  | 
 | 
      
        | 69 |  |  | * NOTE: The native XHR implementation in Safari 2.0.4 has been confirmed to leak
 | 
      
        | 70 |  |  | memory.
 | 
      
        | 71 |  |  | 
 | 
      
        | 72 |  |  | * UPDATE: The XHR implementation in Safari 3.0 beta(and WebKit builds) now
 | 
      
        | 73 |  |  | appear to handle HTTP 204 responses correctly.  XHR in Opera, as of 9.21, still
 | 
      
        | 74 |  |  | does not produce a valid HTTP status code with an HTTP 204 response.
 | 
      
        | 75 |  |  | 
 | 
      
        | 76 |  |  | *** version 2.2.2 ***
 | 
      
        | 77 |  |  | 
 | 
      
        | 78 |  |  | * No revisions.
 | 
      
        | 79 |  |  | 
 | 
      
        | 80 |  |  | *** version 2.2.1 ***
 | 
      
        | 81 |  |  | 
 | 
      
        | 82 |  |  | * setForm() will include the correct name-value of the HTML Submit button
 | 
      
        | 83 |  |  | clicked where multiple HTML Submit button options are present in an HTML form.
 | 
      
        | 84 |  |  | To enable this feature, include the Event utility source file as a dependency
 | 
      
        | 85 |  |  | before the Connection Manager source file.
 | 
      
        | 86 |  |  | 
 | 
      
        | 87 |  |  | * The XHR implementation in IE6 and IE7, Opera, and Safari do not properly
 | 
      
        | 88 |  |  | handle an HTTP 204 response.  IE6/7 will instead return a Win error 1223.
 | 
      
        | 89 |  |  | handleTransactionResponse() will treat 1223 as an HTTP 204, and route the
 | 
      
        | 90 |  |  | response appropriately to the success callback.  createResponseObject() will
 | 
      
        | 91 |  |  | normalize the response object's status and statusText values to 204 and "No
 | 
      
        | 92 |  |  | Content" respectively.  However, no headers are returned.
 | 
      
        | 93 |  |  | 
 | 
      
        | 94 |  |  | Opera and Safari provide no discernable response with HTTP 204(e.g., response
 | 
      
        | 95 |  |  | object's properties are undefined).  This response will trigger the failure
 | 
      
        | 96 |  |  | callback with a status of 0 and statusText of "communication failure".
 | 
      
        | 97 |  |  | 
 | 
      
        | 98 |  |  | *** version 2.2.0 ***
 | 
      
        | 99 |  |  | 
 | 
      
        | 100 |  |  | * initHeader() now accepts a third argument as a boolean.  When set to true,
 | 
      
        | 101 |  |  | this specific header will automatically be sent with each transaction.
 | 
      
        | 102 |  |  | Otherwise, the header will be set and sent for the specific transaction only.
 | 
      
        | 103 |  |  | Example: initHeader('X-YUI-State','Beta', true); all transactions will send this
 | 
      
        | 104 |  |  | header.
 | 
      
        | 105 |  |  |    * resetDefaultHeaders() will clear the default headers collection.
 | 
      
        | 106 |  |  | 
 | 
      
        | 107 |  |  | * All Connection Mananger transactions will broadcast the header: "X-Requested-
 | 
      
        | 108 |  |  | With: XMLHttpRequest".
 | 
      
        | 109 |  |  |    * This can be turned off: YAHOO.util.Connect.setDefaultXhrHeader(false);
 | 
      
        | 110 |  |  | 
 | 
      
        | 111 |  |  | * The HTTP method argument in asyncRequest is now case-insensitive.
 | 
      
        | 112 |  |  | 
 | 
      
        | 113 |  |  | * uploadFile() will now correctly handle the absence of a callback object,
 | 
      
        | 114 |  |  | allowing the transaction to complete silently.
 | 
      
        | 115 |  |  | 
 | 
      
        | 116 |  |  | *** version 0.12.2 ***
 | 
      
        | 117 |  |  | 
 | 
      
        | 118 |  |  | * The Opera/Connection Manager concurrent object condition, described in version
 | 
      
        | 119 |  |  | 0.12.0, no longer tests applies for Opera, version 9.10.
 | 
      
        | 120 |  |  | 
 | 
      
        | 121 |  |  | *** version 0.12.1 ***
 | 
      
        | 122 |  |  | 
 | 
      
        | 123 |  |  | * connection-debug.js corrected and synchronized with connection.js.  Code
 | 
      
        | 124 |  |  | inconsistencies between the two files existed in 0.12.0.
 | 
      
        | 125 |  |  | 
 | 
      
        | 126 |  |  | *** version 0.12.0 ***
 | 
      
        | 127 |  |  | 
 | 
      
        | 128 |  |  | * When uploading files via setForm() and asyncRequest includes a POST data
 | 
      
        | 129 |  |  | argument, appendPostData() will create hidden input fields for each postData
 | 
      
        | 130 |  |  | label/value and append each field to the form object.
 | 
      
        | 131 |  |  | 
 | 
      
        | 132 |  |  | * setForm() returns the assembled label/value string of the parsed HTML form
 | 
      
        | 133 |  |  | fields.
 | 
      
        | 134 |  |  | 
 | 
      
        | 135 |  |  | * NOTE: Opera 9.02 does not allow for more than 12 concurrent Connection Manager
 | 
      
        | 136 |  |  | objects.
 | 
      
        | 137 |  |  | 
 | 
      
        | 138 |  |  | The following example creates 12 requests in a loop:
 | 
      
        | 139 |  |  | for(var n=0; n<=12; i++){
 | 
      
        | 140 |  |  |   conn[n] = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
 | 
      
        | 141 |  |  | }
 | 
      
        | 142 |  |  | 
 | 
      
        | 143 |  |  | If n > 13, Opera 9.02 will crash.  Connection manager objects count n must be <=
 | 
      
        | 144 |  |  | 12 at all times.  This condition was not present in Opera version 9.01.
 | 
      
        | 145 |  |  | 
 | 
      
        | 146 |  |  | This condition does not apply to other A-Grade browsers (
 | 
      
        | 147 |  |  | http://developer.yahoo.com/yui/articles/gbs/gbs_browser-chart.html)
 | 
      
        | 148 |  |  | 
 | 
      
        | 149 |  |  | *** version 0.11.3 ***
 | 
      
        | 150 |  |  | 
 | 
      
        | 151 |  |  | * YUI Event dependency for file uploading is now optional.
 | 
      
        | 152 |  |  | 
 | 
      
        | 153 |  |  | * uploadFile() now sets unique IDs for each file upload transaction to prevent
 | 
      
        | 154 |  |  | iframe collisions with parallel uploads.
 | 
      
        | 155 |  |  | 
 | 
      
        | 156 |  |  | * The callback object now has property responseXML to provide support for file
 | 
      
        | 157 |  |  | upload transactions that return an XML document.
 | 
      
        | 158 |  |  | 
 | 
      
        | 159 |  |  | * setForm() will verify if a select option value attribute is present and use
 | 
      
        | 160 |  |  | its value, including empty string, before using the text node value.
 | 
      
        | 161 |  |  | 
 | 
      
        | 162 |  |  | * Modified polling mechanism in handleReadyState() and
 | 
      
        | 163 |  |  | handleTransactionResponse() to prevent infinite polling if JavaScript errors
 | 
      
        | 164 |  |  | occur in the user-defined callback.
 | 
      
        | 165 |  |  | 
 | 
      
        | 166 |  |  | * createFrame() will now accept a boolean argument of true to set the frame
 | 
      
        | 167 |  |  | source to "javascript:false" to prevent IE from throwing security warnings in an
 | 
      
        | 168 |  |  | HTTPS environment.
 | 
      
        | 169 |  |  | 
 | 
      
        | 170 |  |  | * setHeader() now enumerates through the _http_header object using
 | 
      
        | 171 |  |  | hasOwnProperty() to prevent collisions with members added to Object via
 | 
      
        | 172 |  |  | prototype.
 | 
      
        | 173 |  |  | 
 | 
      
        | 174 |  |  | * If using setForm() and asyncRequest includes a POST data argument, the data
 | 
      
        | 175 |  |  | will be concatenated to the HTML form POST message.
 | 
      
        | 176 |  |  | 
 | 
      
        | 177 |  |  | *** version 0.11.2 ***
 | 
      
        | 178 |  |  | 
 | 
      
        | 179 |  |  | * No revisions.
 | 
      
        | 180 |  |  | 
 | 
      
        | 181 |  |  | *** version 0.11.1 ***
 | 
      
        | 182 |  |  | 
 | 
      
        | 183 |  |  | * uploadFile() now verifies the existence of callback.upload before invoking
 | 
      
        | 184 |  |  | callback, with or without object scope.
 | 
      
        | 185 |  |  | 
 | 
      
        | 186 |  |  | *** version 0.11.0 ***
 | 
      
        | 187 |  |  | 
 | 
      
        | 188 |  |  | * Each transaction can be defined with a timeout threshold, in milliseconds,
 | 
      
        | 189 |  |  | through the callback object.  If the threshold is reached, and the transaction
 | 
      
        | 190 |  |  | hasn't yet completed, the transaction will call abort().
 | 
      
        | 191 |  |  | 
 | 
      
        | 192 |  |  | * abort() will now accept a callback object as the second argument.  The
 | 
      
        | 193 |  |  | failure callback will receive a response object to indicate the transaction was
 | 
      
        | 194 |  |  | aborted.
 | 
      
        | 195 |  |  | 
 | 
      
        | 196 |  |  | * setForm() will now support file uploads by setting the second argument to
 | 
      
        | 197 |  |  | true (e.g., YAHOO.util.Connect.setForm(formObject, true).  File upload does not
 | 
      
        | 198 |  |  | use the callback success or failure handler.  Instead, it uses a new callback
 | 
      
        | 199 |  |  | object handler: upload.
 | 
      
        | 200 |  |  | 
 | 
      
        | 201 |  |  | * HTML form submit will no longer submit form fields without a defined name
 | 
      
        | 202 |  |  | attribute.
 | 
      
        | 203 |  |  | 
 | 
      
        | 204 |  |  | * The default POST header of 'Content-Type','application/x-www-form-urlencoded'
 | 
      
        | 205 |  |  | can be overridden by calling setDefaultPostHeader(false).  This
 | 
      
        | 206 |  |  | will remove the default header from non-HTML form, POST submissions.
 | 
      
        | 207 |  |  | 
 | 
      
        | 208 |  |  | * setHeader() now enumerates through the _http_header object with
 | 
      
        | 209 |  |  | propertyIsEnumerable to prevent collisions with members added to Object via
 | 
      
        | 210 |  |  | prototype.
 | 
      
        | 211 |  |  | 
 | 
      
        | 212 |  |  | *** version 0.10.0 ***
 | 
      
        | 213 |  |  | 
 | 
      
        | 214 |  |  | * handleTransactionResponse() now treats the full HTTP 2xx range as a success
 | 
      
        | 215 |  |  | case, instead of just HTTP 200.
 | 
      
        | 216 |  |  | 
 | 
      
        | 217 |  |  | * To accommodate multiple field values in Mozilla/Firefox, multiple initHeader
 | 
      
        | 218 |  |  | calls with the same label will now result in the values concatenated to a
 | 
      
        | 219 |  |  | comma- delimited string value.
 | 
      
        | 220 |  |  | Example:
 | 
      
        | 221 |  |  | Setting Content-Type:'application/x-www-form-urlencoded' and Content-
 | 
      
        | 222 |  |  | Type:'text/xml' will result in Content-Type:'application/x-www-form-urlencoded,
 | 
      
        | 223 |  |  | text/xml'.
 | 
      
        | 224 |  |  | 
 | 
      
        | 225 |  |  | * Default polling interval lowered to 50ms.
 | 
      
        | 226 |  |  | 
 | 
      
        | 227 |  |  | * YAHOO.util.Connect.setPollingInterval() will allow you to set a polling
 | 
      
        | 228 |  |  | interval -- in milliseconds -- to override the default value.
 | 
      
        | 229 |  |  | 
 | 
      
        | 230 |  |  | * YAHOO.util.Connect.getResponseHeader[headerLabel] now supported as a response
 | 
      
        | 231 |  |  | object property to provide symmetry with the native XHR object's property.
 | 
      
        | 232 |  |  | Example:
 | 
      
        | 233 |  |  | YAHOO.util.Connect.getResponseHeader['Content-Length'] will return the value
 | 
      
        | 234 |  |  | for the Content-Length header, if the header is available.
 | 
      
        | 235 |  |  | 
 | 
      
        | 236 |  |  | * YAHOO.util.Connect.allResponseHeaders property renamed to
 | 
      
        | 237 |  |  | getAllResponseHeaders to provide symmetry with the native XHR object's
 | 
      
        | 238 |  |  | property.
 | 
      
        | 239 |  |  | 
 | 
      
        | 240 |  |  | * YAHOO.util.Connect.setForm() now supports HTTP GET as well as HTTP POST.
 | 
      
        | 241 |  |  | 
 | 
      
        | 242 |  |  | * YAHOO.util.Connect.setForm() now accepts an HTML form object as well as its
 | 
      
        | 243 |  |  | name attribute value.
 | 
      
        | 244 |  |  | 
 | 
      
        | 245 |  |  | * YAHOO.util.Connect.setForm() will not submit HTML form fields that are
 | 
      
        | 246 |  |  | disabled or do not have a name attribute value.
 | 
      
        | 247 |  |  | 
 | 
      
        | 248 |  |  | * [FIXED] Response exceptions result in infinite callback loop in
 | 
      
        | 249 |  |  | Mozilla/Firefox.
 | 
      
        | 250 |  |  | 
 | 
      
        | 251 |  |  | * [FIXED] YAHOO.util.Connect.abort() now properly clears polling interval.
 | 
      
        | 252 |  |  | 
 | 
      
        | 253 |  |  | * [FIXED] isCallInProgress() now verifies whether XHR instance still exists,
 | 
      
        | 254 |  |  | and returns false if the connection object is no longer available.
 | 
      
        | 255 |  |  | 
 | 
      
        | 256 |  |  | *** version 0.9.0 ***
 | 
      
        | 257 |  |  | 
 | 
      
        | 258 |  |  | * Initial release
 |