long as (s)he’s connected • Iframe source downloadable as a static file to be hosted by local web server • Tunnel is created as soon as static file is detected at URL tunneler specifies
node.js needs to keep them straight and respond to the correct request • We created a unique token identifier kept through entire request/response cycle
url • Here’s what a request to the web tunnel looks like: { token: ‘some-unique-token’, url: ‘/foo/bar/’, method: ‘GET’, headers: ‘User-Agent Mozilla/5.0...’, {
buffer • Base64 encode the typed array of bytes • You’re now serializing binary data in JS! var xhr = new XMLHttpRequest(); xrh.responseType = ‘arraybuffer’; xhr.onload = function() { var bytes = new Uint8Array(this.response); // you’re off to the races! }
header • Instead, the redirect happens silently in the guts of the browser • Result is outdated url on the client THIS SUCKS. Please provide a fix! Dear W3C,
didn’t have time to accomplish it. • XHR2.send accepts an instance of FormData for multi-part form posts. • Node.js would need to base64 encode for sending to the iframe via postMessage https://developer.mozilla.org/en/ XMLHttpRequest/FormData