http2
Advanced tools
Comparing version 2.6.0 to 2.7.0
Version history | ||
=============== | ||
### 2.7.0 (2014-07-31) ### | ||
* Upgrade to the latest draft: [draft-ietf-httpbis-http2-14] | ||
[draft-ietf-httpbis-http2-14]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14 | ||
### 2.6.0 (2014-06-18) ### | ||
@@ -5,0 +11,0 @@ |
@@ -124,3 +124,3 @@ // Public API | ||
// [2]: http://nodejs.org/api/http.html | ||
// [3]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-13#section-8.1.3.2 | ||
// [3]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.3.2 | ||
// [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-13#section-8.1.3.1) | ||
// [Request Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.3.1) | ||
// * `headers` argument: HTTP/2.0 request and response header fields carry information as a series | ||
@@ -565,3 +565,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-13#section-8.1.3.1) | ||
// [Request Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.3.1) | ||
// * `headers` argument: HTTP/2.0 request and response header fields carry information as a series | ||
@@ -615,2 +615,6 @@ // of key-value pairs. This includes the target URI for the request, the status code for the | ||
OutgoingResponse.prototype.writeHead = function writeHead(statusCode, reasonPhrase, headers) { | ||
if (this.headersSent) { | ||
return; | ||
} | ||
if (typeof reasonPhrase === 'string') { | ||
@@ -1006,3 +1010,3 @@ this._log.warn('Reason phrase argument was present but ignored by the writeHead method'); | ||
// [Response Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-13#section-8.1.3.2) | ||
// [Response Header Fields](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.3.2) | ||
// * `headers` argument: HTTP/2.0 request and response header fields carry information as a series | ||
@@ -1009,0 +1013,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 13)][http2] implementation for [node.js][node]. | ||
// [node-http2][homepage] is an [HTTP/2 (draft 14)][http2] implementation for [node.js][node]. | ||
// | ||
@@ -14,3 +14,3 @@ // The core of the protocol is implemented by the [http2-protocol] module. This module provides | ||
// [http2-protocol]: https://github.com/molnarg/node-http2-protocol | ||
// [http2]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-13 | ||
// [http2]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-14 | ||
// [node]: http://nodejs.org/ | ||
@@ -17,0 +17,0 @@ // [node-https]: http://nodejs.org/api/https.html |
{ | ||
"name": "http2", | ||
"version": "2.6.0", | ||
"version": "2.7.0", | ||
"description": "An HTTP/2 client and server implementation", | ||
@@ -10,3 +10,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"http2-protocol": ">=0.13.0" | ||
"http2-protocol": ">=0.14.0" | ||
}, | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
node-http2 | ||
========== | ||
An HTTP/2 ([draft-ietf-httpbis-http2-13](http://tools.ietf.org/html/draft-ietf-httpbis-http2-13)) | ||
An HTTP/2 ([draft-ietf-httpbis-http2-14](http://tools.ietf.org/html/draft-ietf-httpbis-http2-14)) | ||
client and server implementation for node.js. | ||
![Travis CI status](https://travis-ci.org/molnarg/node-http2.svg?branch=master) | ||
Installation | ||
@@ -117,8 +119,8 @@ ------------ | ||
To generate a code coverage report, run `npm test --coverage` (which runs very slowly, be patient). | ||
Code coverage summary as of version 2.5.3: | ||
Code coverage summary as of version 2.7.0: | ||
``` | ||
Statements : 92.64% ( 403/435 ) | ||
Branches : 79.41% ( 135/170 ) | ||
Statements : 92.68% ( 405/437 ) | ||
Branches : 79.65% ( 137/172 ) | ||
Functions : 92.31% ( 60/65 ) | ||
Lines : 92.64% ( 403/435 ) | ||
Lines : 92.68% ( 405/437 ) | ||
``` | ||
@@ -125,0 +127,0 @@ |
@@ -88,3 +88,3 @@ var expect = require('chai').expect; | ||
mockFallbackRequest[name] = function() { | ||
expect(arguments).to.deep.equal(originalArguments); | ||
expect(Array.prototype.slice.call(arguments)).to.deep.equal(originalArguments); | ||
done(); | ||
@@ -115,2 +115,18 @@ }; | ||
}); | ||
describe('OutgoingResponse', function() { | ||
it('should throw error when writeHead is called multiple times on it', function() { | ||
var called = false; | ||
var stream = { _log: util.log, headers: function () { | ||
if (called) { | ||
throw new Error('Should not send headers twice'); | ||
} else { | ||
called = true; | ||
} | ||
}, once: util.noop }; | ||
var response = new http2.OutgoingResponse(stream); | ||
response.writeHead(200); | ||
response.writeHead(404) | ||
}); | ||
}); | ||
describe('test scenario', function() { | ||
@@ -117,0 +133,0 @@ describe('simple request', function() { |
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
77146
14
1498
171
9
Updatedhttp2-protocol@>=0.14.0