Bug 958712 part 1/3 - update CI node-http2 to v3.1.1 r=mcmanus
authorNicholas Hurley <hurley@todesschaf.org>
Fri, 30 Jan 2015 11:15:41 -0800
changeset 227034 a93ad0ca3442dc037597685c7a2c1caaae0dbcaa
parent 227033 a2a4e3345295773f8dd2c161815d681420f192e9
child 227035 6a529065cc9e5ddbacf78258a8adc356ae398c48
push id55003
push userhurley@todesschaf.org
push dateMon, 02 Feb 2015 20:13:14 +0000
treeherdermozilla-inbound@26ad04ac4ba3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcmanus
bugs958712
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 958712 part 1/3 - update CI node-http2 to v3.1.1 r=mcmanus
testing/xpcshell/node-http2/HISTORY.md
testing/xpcshell/node-http2/lib/protocol/compressor.js
testing/xpcshell/node-http2/package.json
--- a/testing/xpcshell/node-http2/HISTORY.md
+++ b/testing/xpcshell/node-http2/HISTORY.md
@@ -1,11 +1,16 @@
 Version history
 ===============
 
+### 3.1.1 (2015-01-29) ###
+
+* Bugfix release.
+* Fixes an issue sending a push promise that is large enough to fill the frame (#93).
+
 ### 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) ###
--- a/testing/xpcshell/node-http2/lib/protocol/compressor.js
+++ b/testing/xpcshell/node-http2/lib/protocol/compressor.js
@@ -1158,17 +1158,21 @@ Compressor.prototype._transform = functi
   //   * cuts the header block into `chunks` that are not larger than `MAX_HTTP_PAYLOAD_SIZE`
   //   * for each chunk, it pushes out a chunk frame that is identical to the original, except
   //     the `data` property which holds the given chunk, the type of the frame which is always
   //     CONTINUATION except for the first frame, and the END_HEADERS/END_PUSH_STREAM flag that
   //     marks the last frame and the END_STREAM flag which is always false before the end
   if (frame.type === 'HEADERS' || frame.type === 'PUSH_PROMISE') {
     var buffer = this.compress(frame.headers);
 
-    var chunks = cut(buffer, MAX_HTTP_PAYLOAD_SIZE);
+    // This will result in CONTINUATIONs from a PUSH_PROMISE being 4 bytes shorter than they could
+    // be, but that's not the end of the world, and it prevents us from going over MAX_HTTP_PAYLOAD_SIZE
+    // on the initial PUSH_PROMISE frame.
+    var adjustment = frame.type === 'PUSH_PROMISE' ? 4 : 0;
+    var chunks = cut(buffer, MAX_HTTP_PAYLOAD_SIZE - adjustment);
 
     for (var i = 0; i < chunks.length; i++) {
       var chunkFrame;
       var first = (i === 0);
       var last = (i === chunks.length - 1);
 
       if (first) {
         chunkFrame = util._extend({}, frame);
--- a/testing/xpcshell/node-http2/package.json
+++ b/testing/xpcshell/node-http2/package.json
@@ -1,11 +1,11 @@
 {
   "name": "http2",
-  "version": "3.1.0",
+  "version": "3.1.1",
   "description": "An HTTP/2 client and server implementation",
   "main": "lib/index.js",
   "engines" : {
     "node" : ">=0.10.19"
   },
   "devDependencies": {
     "istanbul": "*",
     "chai": "*",