FLUID-3901: XMLHttpRequest is undefined error in IE 6

Metadata

Source
FLUID-3901
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
N/A
Reporter
Justin Obara
Created
2010-12-14T16:17:29.816-0500
Updated
2010-12-14T17:31:01.235-0500
Versions
N/A
Fixed Versions
  1. 1.3
Component
  1. Uploader

Description

When loading the uploader demo in IE 6 it throws an XMLHttpRequest is undefined error.

This appears to be caused by this line of code.
line: 23

fluid.browser.binaryXHR = function () {
var canSendBinary = window.FormData || XMLHttpRequest.prototype.sendAsBinary;
return canSendBinary ? fluid.typeTag("fluid.browser.supportsBinaryXHR") : undefined;
};

Below is Colin's suggested fix from the fluid-work channel ( http://wiki.fluidproject.org/display/fluid/fluid-work+IRC+Logs-2010-12-14 )

var canSendBinary = window.FormData || (window.XMLHttpRequest && window.XMLHttpRequest.prototype.sendAsBinary);

Environments

Win Xp IE 6

Attachments

Comments

  • Mike Lam commented 2010-12-14T16:48:06.459-0500

    More complete feature check of XHR for progressive enhancement.

  • Justin Obara commented 2010-12-14T17:31:01.227-0500

    Reviewed and Committed Mike's patch ( FLUID-3901.patch ). Also had him run the demo with it and verified that it worked and that the unit tests are still passing.