Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d24d5510a | |||
| ff68130d89 | |||
| 6bab67d17a | |||
| 6433ea8cad | |||
| 9ebf801ebb | |||
| 154f6b9e56 | |||
| 6dea87e704 | |||
| 8b9f5a43c1 |
@@ -81,7 +81,7 @@ characteristics as this mode did in versions before 1.5.
|
||||
* Any operations, including `request.setTimeout`, that operate directly on the underlying
|
||||
socket.
|
||||
* Any options that are disallowed for security reasons. This includes setting or getting
|
||||
certian headers.
|
||||
certain headers.
|
||||
* `message.httpVersion`
|
||||
* `message.rawHeaders` is modified by the browser, and may not quite match what is sent by
|
||||
the server.
|
||||
@@ -112,7 +112,7 @@ that run in the browser (found in `test/browser`). Normally the browser tests ru
|
||||
|
||||
Running `npm test` will run both sets of tests, but in order for the Sauce Labs tests to run
|
||||
you will need to sign up for an account (free for open source projects) and put the
|
||||
credentials in [a `.zuulrc` file](https://github.com/defunctzombie/zuul/wiki/zuulrc).
|
||||
credentials in a [`.zuulrc` file](https://github.com/defunctzombie/zuul/wiki/zuulrc).
|
||||
|
||||
To run just the node tests, run `npm run test-node`.
|
||||
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@ var capability = require('./capability')
|
||||
var inherits = require('inherits')
|
||||
var response = require('./response')
|
||||
var stream = require('stream')
|
||||
var toArrayBuffer = require('to-arraybuffer')
|
||||
|
||||
var IncomingMessage = response.IncomingMessage
|
||||
var rStates = response.readyStates
|
||||
@@ -96,7 +97,7 @@ ClientRequest.prototype._onFinish = function () {
|
||||
if (opts.method === 'POST' || opts.method === 'PUT' || opts.method === 'PATCH') {
|
||||
if (capability.blobConstructor) {
|
||||
body = new global.Blob(self._body.map(function (buffer) {
|
||||
return buffer.toArrayBuffer()
|
||||
return toArrayBuffer(buffer)
|
||||
}), {
|
||||
type: (headersObj['content-type'] || {}).value || ''
|
||||
})
|
||||
|
||||
+6
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "stream-http",
|
||||
"version": "2.0.5",
|
||||
"version": "2.1.0",
|
||||
"description": "Streaming http in the browser",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@@ -15,6 +15,10 @@
|
||||
},
|
||||
"author": "John Hiesey",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jhiesey/stream-http/issues"
|
||||
},
|
||||
"homepage": "https://github.com/jhiesey/stream-http#readme",
|
||||
"keywords": [
|
||||
"http",
|
||||
"stream",
|
||||
@@ -25,6 +29,7 @@
|
||||
"dependencies": {
|
||||
"builtin-status-codes": "^1.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
"to-arraybuffer": "^1.0.0",
|
||||
"xtend": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = function (self) {
|
||||
var buffers = []
|
||||
|
||||
res.on('end', function () {
|
||||
self.postMessage(Buffer.concat(buffers).toArrayBuffer())
|
||||
self.postMessage(Buffer.concat(buffers).buffer)
|
||||
})
|
||||
|
||||
res.on('data', function (data) {
|
||||
|
||||
Reference in New Issue
Block a user