http2
Advanced tools
Comparing version 3.0.1 to 3.1.0
Version history | ||
=============== | ||
### 3.1.0 (2014-12-11) ### | ||
* Upgrade to the latest draft: [draft-ietf-httpbis-http2-16] | ||
* This involves some state transition changes that are technically incompatible with draft-14. If you need to be assured to interop on -14, continue using 3.0.1 | ||
[draft-ietf-httpbis-http2-16]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-16 | ||
### 3.0.1 (2014-11-20) ### | ||
@@ -5,0 +12,0 @@ |
@@ -124,3 +124,3 @@ // Public API | ||
// [2]: http://nodejs.org/api/http.html | ||
// [3]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.3.2 | ||
// [3]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-8.1.2.4 | ||
// [expect-continue]: https://github.com/http2/http2-spec/issues/18 | ||
@@ -250,3 +250,3 @@ // [connect]: https://github.com/http2/http2-spec/issues/230 | ||
// [Request Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.3.1) | ||
// [Request Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-8.1.2.3) | ||
// * `headers` argument: HTTP/2.0 request and response header fields carry information as a series | ||
@@ -607,3 +607,3 @@ // of key-value pairs. This includes the target URI for the request, the status code for the | ||
// [Request Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.3.1) | ||
// [Request Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-8.1.2.3) | ||
// * `headers` argument: HTTP/2.0 request and response header fields carry information as a series | ||
@@ -1090,3 +1090,3 @@ // of key-value pairs. This includes the target URI for the request, the status code for the | ||
// [Response Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.3.2) | ||
// [Response Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-8.1.2.4) | ||
// * `headers` argument: HTTP/2.0 request and response header fields carry information as a series | ||
@@ -1093,0 +1093,0 @@ // of key-value pairs. This includes the target URI for the request, the status code for the |
@@ -1,2 +0,2 @@ | ||
// [node-http2][homepage] is an [HTTP/2 (draft 14)][http2] implementation for [node.js][node]. | ||
// [node-http2][homepage] is an [HTTP/2 (draft 16)][http2] implementation for [node.js][node]. | ||
// | ||
@@ -13,3 +13,3 @@ // The core of the protocol is implemented in the protocol sub-directory. This directory provides | ||
// [homepage]: https://github.com/molnarg/node-http2 | ||
// [http2]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14 | ||
// [http2]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-16 | ||
// [node]: http://nodejs.org/ | ||
@@ -16,0 +16,0 @@ // [node-https]: http://nodejs.org/api/https.html |
@@ -22,3 +22,3 @@ var assert = require('assert'); | ||
// | ||
// [1]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.9.2 | ||
// [1]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.9.2 | ||
@@ -25,0 +25,0 @@ // API for child classes |
@@ -149,3 +149,3 @@ // The framer consists of two [Transform Stream][1] subclasses that operate in [object mode][2]: | ||
// [Frame Header](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-4.1) | ||
// [Frame Header](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-4.1) | ||
// -------------------------------------------------------------- | ||
@@ -273,3 +273,3 @@ // | ||
// [DATA Frames](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.1) | ||
// [DATA Frames](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.1) | ||
// ------------------------------------------------------------ | ||
@@ -313,3 +313,3 @@ // | ||
// [HEADERS](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.2) | ||
// [HEADERS](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.2) | ||
// -------------------------------------------------------------- | ||
@@ -396,3 +396,3 @@ // | ||
// [PRIORITY](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.3) | ||
// [PRIORITY](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.3) | ||
// ------------------------------------------------------- | ||
@@ -442,3 +442,3 @@ // | ||
// [RST_STREAM](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.4) | ||
// [RST_STREAM](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.4) | ||
// ----------------------------------------------------------- | ||
@@ -481,3 +481,3 @@ // | ||
// [SETTINGS](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.5) | ||
// [SETTINGS](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.5) | ||
// ------------------------------------------------------- | ||
@@ -589,3 +589,3 @@ // | ||
// [PUSH_PROMISE](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.6) | ||
// [PUSH_PROMISE](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.6) | ||
// --------------------------------------------------------------- | ||
@@ -651,3 +651,3 @@ // | ||
// [PING](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.7) | ||
// [PING](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.7) | ||
// ----------------------------------------------- | ||
@@ -682,3 +682,3 @@ // | ||
// [GOAWAY](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.8) | ||
// [GOAWAY](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.8) | ||
// --------------------------------------------------- | ||
@@ -734,3 +734,3 @@ // | ||
// [WINDOW_UPDATE](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.9) | ||
// [WINDOW_UPDATE](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.9) | ||
// ----------------------------------------------------------------- | ||
@@ -773,3 +773,3 @@ // | ||
// [CONTINUATION](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.10) | ||
// [CONTINUATION](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-6.10) | ||
// ------------------------------------------------------------ | ||
@@ -799,3 +799,3 @@ // | ||
// [ALTSVC](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.11) | ||
// [ALTSVC](http://tools.ietf.org/html/draft-ietf-httpbis-alt-svc-04#section-4) | ||
// ------------------------------------------------------------ | ||
@@ -889,3 +889,3 @@ // | ||
// [BLOCKED](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-6.12) | ||
// BLOCKED | ||
// ------------------------------------------------------------ | ||
@@ -910,3 +910,3 @@ // | ||
// [Error Codes](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-7) | ||
// [Error Codes](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-7) | ||
// ------------------------------------------------------------ | ||
@@ -913,0 +913,0 @@ |
@@ -1,2 +0,2 @@ | ||
// [node-http2-protocol][homepage] is an implementation of the [HTTP/2 (draft 14)][http2] | ||
// [node-http2-protocol][homepage] is an implementation of the [HTTP/2 (draft 16)][http2] | ||
// framing layer for [node.js][node]. | ||
@@ -31,6 +31,6 @@ // | ||
// [homepage]: https://github.com/molnarg/node-http2 | ||
// [http2]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14 | ||
// [http2-connheader]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-3.5 | ||
// [http2-stream]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-5 | ||
// [http2-streamstate]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-5.1 | ||
// [http2]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-16 | ||
// [http2-connheader]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-3.5 | ||
// [http2-stream]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-5 | ||
// [http2-streamstate]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-5.1 | ||
// [node]: http://nodejs.org/ | ||
@@ -41,3 +41,3 @@ // [node-stream]: http://nodejs.org/api/stream.html | ||
exports.VERSION = 'h2-14'; | ||
exports.VERSION = 'h2-16'; | ||
@@ -44,0 +44,0 @@ exports.Endpoint = require('./endpoint').Endpoint; |
@@ -355,3 +355,3 @@ var assert = require('assert'); | ||
// [Stream States](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-5.1) | ||
// [Stream States](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16#section-5.1) | ||
// ---------------- | ||
@@ -447,2 +447,4 @@ // | ||
this._setState('CLOSED'); | ||
} else if (PRIORITY) { | ||
/* No state change */ | ||
} else { | ||
@@ -467,3 +469,3 @@ connectionError = 'PROTOCOL_ERROR'; | ||
this._setState('CLOSED'); | ||
} else if (receiving && PRIORITY) { | ||
} else if (PRIORITY) { | ||
/* No state change */ | ||
@@ -487,3 +489,3 @@ } else { | ||
this._setState('HALF_CLOSED_LOCAL'); | ||
} else if (BLOCKED || (sending && PRIORITY)) { | ||
} else if (BLOCKED || PRIORITY) { | ||
/* No state change */ | ||
@@ -523,3 +525,3 @@ } else { | ||
this._setState('CLOSED'); | ||
} else if (BLOCKED || ALTSVC ||receiving || (sending && (PRIORITY || WINDOW_UPDATE))) { | ||
} else if (BLOCKED || ALTSVC || receiving || PRIORITY || (sending && WINDOW_UPDATE)) { | ||
/* No state change */ | ||
@@ -544,3 +546,3 @@ } else { | ||
this._setState('CLOSED'); | ||
} else if (BLOCKED || ALTSVC ||sending || (receiving && (WINDOW_UPDATE || PRIORITY))) { | ||
} else if (BLOCKED || ALTSVC || sending || PRIORITY || (receiving && WINDOW_UPDATE)) { | ||
/* No state change */ | ||
@@ -573,5 +575,5 @@ } else { | ||
case 'CLOSED': | ||
if ((sending && RST_STREAM) || | ||
if (PRIORITY || (sending && RST_STREAM) || | ||
(receiving && this._closedByUs && | ||
(this._closedWithRst || WINDOW_UPDATE || PRIORITY || RST_STREAM || ALTSVC))) { | ||
(this._closedWithRst || WINDOW_UPDATE || RST_STREAM || ALTSVC))) { | ||
/* No state change */ | ||
@@ -578,0 +580,0 @@ } else { |
{ | ||
"name": "http2", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "An HTTP/2 client and server implementation", | ||
@@ -41,3 +41,4 @@ "main": "lib/index.js", | ||
"James Willcox", | ||
"David Björklund" | ||
"David Björklund", | ||
"Patrick McManus" | ||
], | ||
@@ -44,0 +45,0 @@ "license": "MIT", |
node-http2 | ||
========== | ||
An HTTP/2 ([draft-ietf-httpbis-http2-14](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14)) | ||
An HTTP/2 ([draft-ietf-httpbis-http2-16](http://tools.ietf.org/html/draft-ietf-httpbis-http2-16)) | ||
client and server implementation for node.js. | ||
@@ -164,2 +164,3 @@ | ||
* [David Björklund](https://github.com/kesla) | ||
* [Patrick McManus](https://github.com/mcmanus) | ||
@@ -166,0 +167,0 @@ Special thanks to Google for financing the development of this module as part of their [Summer of |
@@ -115,3 +115,2 @@ var expect = require('chai').expect; | ||
{ type: 'DATA', flags: {}, data: new Buffer(5) }, | ||
{ type: 'PRIORITY', flags: {}, priority: 1 }, | ||
{ type: 'WINDOW_UPDATE', flags: {}, settings: {} }, | ||
@@ -129,3 +128,2 @@ { type: 'PUSH_PROMISE', flags: {}, headers: {} }, | ||
{ type: 'DATA', flags: {}, data: new Buffer(5) }, | ||
{ type: 'PRIORITY', flags: {}, priority: 1 }, | ||
{ type: 'PUSH_PROMISE', flags: {}, headers: {} }, | ||
@@ -148,3 +146,2 @@ { type: 'WINDOW_UPDATE', flags: {}, settings: {} } | ||
{ type: 'DATA', flags: {}, data: new Buffer(5) }, | ||
{ type: 'PRIORITY', flags: {}, priority: 1 }, | ||
{ type: 'WINDOW_UPDATE', flags: {}, settings: {} }, | ||
@@ -155,3 +152,2 @@ { type: 'PUSH_PROMISE', flags: {}, headers: {} } | ||
{ type: 'DATA', flags: {}, data: new Buffer(5) }, | ||
{ type: 'PRIORITY', flags: {}, priority: 1 }, | ||
{ type: 'PUSH_PROMISE', flags: {}, headers: {} }, | ||
@@ -176,3 +172,2 @@ { type: 'WINDOW_UPDATE', flags: {}, settings: {} } | ||
CLOSED: [ | ||
{ type: 'PRIORITY', flags: {}, priority: 1 }, | ||
{ type: 'WINDOW_UPDATE', flags: {}, settings: {} }, | ||
@@ -205,3 +200,3 @@ { type: 'HEADERS', flags: {}, headers: {}, priority: undefined }, | ||
stream.upstream.write({ type: 'HEADERS', headers:{}, flags: { END_STREAM: true }, count_change: util.noop }); | ||
example_frames.forEach(function(invalid_frame) { | ||
example_frames.slice(1).forEach(function(invalid_frame) { | ||
invalid_frame.count_change = util.noop; | ||
@@ -208,0 +203,0 @@ expect(stream._transition.bind(stream, false, invalid_frame)).to.throw('Uncaught, unspecified "error" event.'); |
305167
177
7140