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

spdy

Package Overview
Dependencies
Maintainers
1
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 1.3.3 to 1.3.4

examples/hello_world/app.js

13

lib/spdy/response.js
var spdy = require('../spdy'),
http = require('http');
http = require('http'),
res = http.ServerResponse.prototype;

@@ -14,11 +15,9 @@ //

if (!this._headers) return {};
var headers = {};
var keys = Object.keys(this._headers);
var keys = Object.keys(this._headerNames);
for (var i = 0, l = keys.length; i < l; i++) {
var key = keys[i];
headers[(this._headerNames[key] || '').toLowerCase()] = this._headers[key];
this._headerNames[key] = this._headerNames[key].toLowerCase();
}
return headers;
return res._renderHeaders.call(this);
};

@@ -25,0 +24,0 @@

{
"name": "spdy",
"version": "1.3.3",
"version": "1.3.4",
"description": "Implementation of the SPDY protocol on node.js.",

@@ -20,3 +20,7 @@ "keywords": [

"Chris Storm <github@eeecooks.com>",
"François de Metz <francois@2metz.fr>"
"François de Metz <francois@2metz.fr>",
"Ilya Grigorik <ilya@igvita.com>",
"Roberto Peon",
"Tatsuhiro Tsujikawa",
"Jesse Cravens <jesse.cravens@gmail.com>"
],

@@ -23,0 +27,0 @@ "dependencies": {},

# SPDY Server for node.js [![Build Status](https://secure.travis-ci.org/indutny/node-spdy.png)](http://travis-ci.org/indutny/node-spdy)
<a href="http://flattr.com/thing/758213/indutnynode-spdy-on-GitHub" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a>
With this module you can create [SPDY](http://www.chromium.org/spdy) servers

@@ -27,12 +30,29 @@ in node.js with natural http module interface and fallback to regular https

And by popular demand - usage with
[express](https://github.com/visionmedia/express):
```javascript
var spdy = require('spdy'),
express = require('express'),
fs = require('fs');
var options = { /* the same as above */ };
var app = express();
app.use(/* your favorite middleware */);
var server = spdy.createServer(options, app);
server.listen(443);
```
## API
API is compatible with `http` and `https` module, but you can use another
function as base class for SPDYServer. For example,
`require('express').HTTPSServer` given that as base class you'll get a server
compatible with [express](https://github.com/visionmedia/express) API.
function as base class for SPDYServer.
```javascript
spdy.createServer(
[base class constructor, i.e. https.Server or express.HTTPSServer],
[base class constructor, i.e. https.Server],
{ /* keys and options */ }, // <- the only one required argument

@@ -44,7 +64,8 @@ [request listener]

Request listener will receive two arguments: `request` and `response`. They're
both instances of `http`'s `IncomingMessage` and `OutgoingMessage`. But two
custom properties are added to both of them: `streamID` and `isSpdy`. The first
one indicates on which spdy stream are sitting request and response. Latter one
is always true and can be checked to ensure that incoming request wasn't
received by HTTPS callback.
both instances of `http`'s `IncomingMessage` and `OutgoingMessage`. But three
custom properties are added to both of them: `streamID`, `isSpdy`,
`spdyVersion`. The first one indicates on which spdy stream are sitting request
and response. Second is always true and can be checked to ensure that incoming
request wasn't received by HTTPS fallback and last one is a number representing
used SPDY protocol version (2 or 3 for now).

@@ -95,2 +116,3 @@ ### Push streams

* [Tatsuhiro Tsujikawa](https://github.com/tatsuhiro-t)
* [Jesse Cravens](https://github.com/jessecravens)

@@ -97,0 +119,0 @@ #### LICENSE

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