Comparing version 3.4.5 to 3.4.7
@@ -11,2 +11,7 @@ 'use strict' | ||
// Node.js 0.10 and 0.12 support | ||
Object.assign = process.versions.modules >= 46 | ||
? Object.assign // eslint-disable-next-line | ||
: util._extend | ||
var EventEmitter = require('events').EventEmitter | ||
@@ -102,3 +107,3 @@ | ||
// TODO(indutny): reconnect automatically? | ||
var socket = this.createConnection(util._extend({ | ||
var socket = this.createConnection(Object.assign({ | ||
NPNProtocols: protocols, | ||
@@ -138,3 +143,3 @@ ALPNProtocols: protocols, | ||
debug('connected protocol=%j', protocol) | ||
var connection = transport.connection.create(socket, util._extend({ | ||
var connection = transport.connection.create(socket, Object.assign({ | ||
protocol: /spdy/.test(protocol) ? 'spdy' : 'http2', | ||
@@ -141,0 +146,0 @@ isServer: false |
@@ -150,3 +150,5 @@ 'use strict' | ||
self.getStream(function (stream) { | ||
stream.send() | ||
if (!stream.connection._isGoaway(stream.id)) { | ||
stream.send() | ||
} | ||
}) | ||
@@ -157,2 +159,7 @@ | ||
// Ensure that the connection is still ok to use | ||
if (state.stream && state.stream.connection._isGoaway(state.stream.id)) { | ||
return | ||
} | ||
req._send = oldSend | ||
@@ -159,0 +166,0 @@ |
@@ -13,3 +13,9 @@ 'use strict' | ||
var EventEmitter = require('events').EventEmitter | ||
var Buffer = require('safe-buffer').Buffer | ||
// Node.js 0.8, 0.10 and 0.12 support | ||
Object.assign = process.versions.modules >= 46 | ||
? Object.assign // eslint-disable-next-line | ||
: util._extend | ||
var spdy = require('../spdy') | ||
@@ -48,3 +54,3 @@ | ||
var actualOptions = util._extend({ | ||
var actualOptions = Object.assign({ | ||
NPNProtocols: protocols, | ||
@@ -112,3 +118,3 @@ | ||
var connection = transport.connection.create(socket, util._extend({ | ||
var connection = transport.connection.create(socket, Object.assign({ | ||
protocol: /spdy/.test(protocol) ? 'spdy' : 'http2', | ||
@@ -137,3 +143,3 @@ isServer: true | ||
var PREFACE = 'PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n' | ||
var PREFACE_BUFFER = new Buffer(PREFACE) | ||
var PREFACE_BUFFER = Buffer.from(PREFACE) | ||
@@ -212,2 +218,8 @@ function hoseFilter (data, callback) { | ||
// For v0.8, 0.10 and 0.12 | ||
if (process.versions.modules < 46) { | ||
// eslint-disable-next-line | ||
this.listenerCount = EventEmitter.listenerCount.bind(this) | ||
} | ||
// Add lazy `checkContinue` listener, otherwise `res.writeContinue` will be | ||
@@ -217,3 +229,3 @@ // called before the response object was patched by us. | ||
/100-continue/i.test(stream.headers.expect) && | ||
EventEmitter.listenerCount(this, 'checkContinue') === 0) { | ||
this.listenerCount('checkContinue') === 0) { | ||
this.once('checkContinue', function (req, res) { | ||
@@ -220,0 +232,0 @@ res.writeContinue() |
@@ -21,3 +21,5 @@ 'use strict' | ||
this.encrypted = true | ||
this.allowHalfOpen = true | ||
} | ||
util.inherits(Socket, net.Socket) | ||
@@ -24,0 +26,0 @@ |
{ | ||
"name": "spdy", | ||
"version": "3.4.5", | ||
"version": "3.4.7", | ||
"description": "Implementation of the SPDY protocol on node.js.", | ||
@@ -37,13 +37,14 @@ "license": "MIT", | ||
"dependencies": { | ||
"debug": "^2.2.0", | ||
"handle-thing": "^1.2.4", | ||
"http-deceiver": "^1.2.4", | ||
"debug": "^2.6.8", | ||
"handle-thing": "^1.2.5", | ||
"http-deceiver": "^1.2.7", | ||
"safe-buffer": "^5.0.1", | ||
"select-hose": "^2.0.0", | ||
"spdy-transport": "^2.0.15" | ||
"spdy-transport": "^2.0.18" | ||
}, | ||
"devDependencies": { | ||
"istanbul": "^0.4.5", | ||
"mocha": "^2.2.x", | ||
"mocha": "^3.4.1", | ||
"pre-commit": "^1.2.2", | ||
"standard": "^8.6.0" | ||
"standard": "^10.0.2" | ||
}, | ||
@@ -50,0 +51,0 @@ "engines": [ |
# SPDY Server for node.js | ||
[![Build Status](https://travis-ci.org/spdy-http2/node-spdy.svg?branch=master)](http://travis-ci.org/spdy-http2/node-spdy) | ||
[![NPM version](https://badge.fury.io/js/node-spdy.svg)](http://badge.fury.io/js/node-spdy) | ||
[![NPM version](https://badge.fury.io/js/spdy.svg)](http://badge.fury.io/js/spdy) | ||
[![dependencies Status](https://david-dm.org/spdy-http2/node-spdy/status.svg?style=flat-square)](https://david-dm.org/spdy-http2/node-spdy) | ||
@@ -6,0 +6,0 @@ [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/) |
@@ -11,2 +11,7 @@ /* eslint-env mocha */ | ||
// Node.js 0.10 and 0.12 support | ||
Object.assign = process.versions.modules >= 46 | ||
? Object.assign // eslint-disable-next-line | ||
: util._extend | ||
describe('SPDY Client', function () { | ||
@@ -22,3 +27,3 @@ describe('regular', function () { | ||
var options = util._extend({ | ||
var options = Object.assign({ | ||
spdy: { | ||
@@ -170,3 +175,3 @@ plain: plain | ||
var options = util._extend({ | ||
var options = Object.assign({ | ||
spdy: { | ||
@@ -173,0 +178,0 @@ plain: plain, |
@@ -96,2 +96,1 @@ /* eslint-env mocha */ | ||
} | ||
@@ -13,2 +13,7 @@ /* eslint-env mocha */ | ||
// Node.js 0.10 and 0.12 support | ||
Object.assign = process.versions.modules >= 46 | ||
? Object.assign // eslint-disable-next-line | ||
: util._extend | ||
describe('SPDY Server', function () { | ||
@@ -20,3 +25,3 @@ fixtures.everyConfig(function (protocol, npn, version, plain) { | ||
beforeEach(function (done) { | ||
server = spdy.createServer(util._extend({ | ||
server = spdy.createServer(Object.assign({ | ||
spdy: { | ||
@@ -23,0 +28,0 @@ 'x-forwarded-for': true, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
56956
1493
14
6
+ Addedsafe-buffer@^5.0.1
Updateddebug@^2.6.8
Updatedhandle-thing@^1.2.5
Updatedhttp-deceiver@^1.2.7
Updatedspdy-transport@^2.0.18