From 9d51a85bdd5205c63d8ae3bafa1e5ed9de49b61e Mon Sep 17 00:00:00 2001 From: Sebastiaan Deckers Date: Thu, 23 Mar 2017 22:06:39 +0800 Subject: [PATCH] Added missing method --- lib/internal/http2/compat.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index 92c27c9a8a..b3f252ec76 100755 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -428,6 +428,15 @@ class Http2ServerResponse extends Stream { stream.respond(headers); } + createPushResponse(headers, options, callback) { + var stream = this[kStream]; + if (!stream) { + callback(new Error('HTTP/2 Stream has been closed')); + return; + } + return stream.pushStream(headers, options, callback); + } + [kBeginSend]() { var state = this[kState]; var stream = this[kStream];