Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spdy

Package Overview
Dependencies
Maintainers
2
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spdy - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

2

lib/spdy/server.js

@@ -231,2 +231,3 @@ 'use strict';

req.spdyVersion = handle.getStream().connection.getVersion();
req.spdyStream = handle.getStream();

@@ -238,2 +239,3 @@ debug('override req/res');

res.writeContinue = spdy.response.writeContinue;
res.spdyStream = handle.getStream();

@@ -240,0 +242,0 @@ handle.assignRequest(req);

2

package.json
{
"name": "spdy",
"version": "3.1.0",
"version": "3.2.0",
"description": "Implementation of the SPDY protocol on node.js.",

@@ -5,0 +5,0 @@ "license": "MIT",

var spdy = require('./');
var fs = require('fs');
var zlib = require('zlib');

@@ -16,5 +17,36 @@ var options = {

spdy.createServer(options, function(req, res) {
res.end('non-100');
['/app/main.js'].forEach(function(url){
console.log('fetching',url);
var stream = res.push(url, {
response: {
'content-type': `${MIME[url.substr(url.lastIndexOf('.')+1)]};charset=utf-8`,
'content-encoding' : 'deflate',
}
});
stream.on('error', function(er) {
throw er;
});
var fstream = fs.createReadStream('/tmp'+url);
var zstream = zlib.createDeflate();
fstream.pipe(zstream).pipe(stream);
});
setTimeout(function() {
res.end(`
<!DOCTYPE html>
<html>
<head>
<script src="/app/main.js" async></script>
<link rel="stylesheet" href="/app/main.css" async>
<link rel="icon" type="image/png" href="/app/favicon-32x32.png" sizes="32x32" async>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body></body>
</html>`
);
}, 500);
}).listen(1443, function() {
console.log(this.address());
console.log('Listening on %j', this.address());
});

@@ -77,2 +77,4 @@ var assert = require('assert');

assert.equal(req.spdyVersion, version);
assert(req.spdyStream);
assert(res.spdyStream);

@@ -79,0 +81,0 @@ assert.equal(req.method, 'GET');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc