Closed Bug 675504 Opened 10 years ago Closed 10 years ago

XMLHttpRequest.responseType not implemented in Gecko 6 in worker. Binary file transfer not possible

Categories

(Core :: DOM: Core & HTML, defect)

6 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 658178

People

(Reporter: bugzilla, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.107 Safari/535.1

Steps to reproduce:

I have written an XMLHttpRequest in a worker, to get a binary file from the server.

The following Code is enough to reproduce the exception:

index.html:
<html>  <head><title>Bin XMLHttpRequest from worker</title>
<script>
var _myWorker = new Worker('thread.js');
function loadInWorker() {
  _myWorker.postMessage({what: 'start'});
  return 0;
}
</script>
  </head>
  <body>
    <button onclick="loadInWorker()">Start background Transfer</button>
</body>

thread.js:
var xhr = new XMLHttpRequest();
	 
onmessage = function(e){ 
  xhr = new XMLHttpRequest();
  xhr.open('GET', 'dummy.bin', true);
  xhr.responseType = 'arraybuffer'; 
}

Bug live on: http://plserver.net/testbug/



Actual results:

uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIXMLHttpRequest.responseType]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: http://localhost/testbug/thread.js :: <TOP_LEVEL> :: line 6" data: no]


Expected results:

Like documented the responseType should be setable also in a worker. It's impossible to get a typedArray with XMLHttpRequest in a worker.

Using this technique not in a worker works fine in Gecko 6.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
Resolution: --- → DUPLICATE
Duplicate of bug: 658178
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.