From d416966b7839ea48785f267581d786c97bec27fe Mon Sep 17 00:00:00 2001 From: Genki Takiuchi Date: Tue, 14 Feb 2023 09:37:22 +0900 Subject: [PATCH 1/4] Don't write status message for HTTP/2 --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e68df7b..13fe5ca 100644 --- a/index.js +++ b/index.js @@ -22,6 +22,7 @@ module.exports.isFinished = isFinished var asyncHooks = tryRequireAsyncHooks() var first = require('ee-first') +var { Http2ServerRequest } = require('http2') /** * Variables. @@ -167,7 +168,11 @@ function createListener (msg) { listener.queue = null for (var i = 0; i < queue.length; i++) { - queue[i](err, msg) + if (msg instanceof Http2ServerRequest) { + queue[i](); + } else { + queue[i](err, msg) + } } } From 01b791d7ff9c32689660c8eae28f5dfe28cd957d Mon Sep 17 00:00:00 2001 From: Genki Takiuchi Date: Tue, 14 Feb 2023 10:21:18 +0900 Subject: [PATCH 2/4] Fixed --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 13fe5ca..57802cf 100644 --- a/index.js +++ b/index.js @@ -22,7 +22,7 @@ module.exports.isFinished = isFinished var asyncHooks = tryRequireAsyncHooks() var first = require('ee-first') -var { Http2ServerRequest } = require('http2') +var http2 = require('http2') /** * Variables. @@ -168,8 +168,8 @@ function createListener (msg) { listener.queue = null for (var i = 0; i < queue.length; i++) { - if (msg instanceof Http2ServerRequest) { - queue[i](); + if (msg instanceof http2.Http2ServerRequest) { + queue[i]() } else { queue[i](err, msg) } From 57e95a0f0b390037347d18fe7515cb2d573995d7 Mon Sep 17 00:00:00 2001 From: Genki Takiuchi Date: Tue, 14 Feb 2023 09:37:22 +0900 Subject: [PATCH 3/4] Don't write status message for HTTP/2 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 57802cf..060e727 100644 --- a/index.js +++ b/index.js @@ -168,7 +168,7 @@ function createListener (msg) { listener.queue = null for (var i = 0; i < queue.length; i++) { - if (msg instanceof http2.Http2ServerRequest) { + if (msg.httpVersionMajor === 2) { queue[i]() } else { queue[i](err, msg) From 3d8832dcd031c4e20c2e89ab7b5c6581632b4426 Mon Sep 17 00:00:00 2001 From: Genki Takiuchi Date: Tue, 14 Feb 2023 10:41:09 +0900 Subject: [PATCH 4/4] Removed http2 --- index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/index.js b/index.js index 060e727..5a02c9f 100644 --- a/index.js +++ b/index.js @@ -22,7 +22,6 @@ module.exports.isFinished = isFinished var asyncHooks = tryRequireAsyncHooks() var first = require('ee-first') -var http2 = require('http2') /** * Variables.