We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Http2ServerResponse
end
1 parent 26e318a commit ccf4ee4Copy full SHA for ccf4ee4
lib/internal/http2/compat.js
@@ -757,9 +757,6 @@ class Http2ServerResponse extends Stream {
757
if (chunk !== null && chunk !== undefined)
758
this.write(chunk, encoding);
759
760
- state.headRequest = stream.headRequest;
761
- state.ending = true;
762
-
763
if (typeof cb === 'function') {
764
if (stream.writableEnded)
765
this.once('finish', cb);
@@ -770,6 +767,9 @@ class Http2ServerResponse extends Stream {
770
767
if (!stream.headersSent)
771
768
this.writeHead(this[kState].statusCode);
772
769
+ state.headRequest = stream.headRequest;
+ state.ending = true;
+
773
if (this[kState].closed || stream.destroyed)
774
ReflectApply(onStreamCloseResponse, stream, []);
775
else
0 commit comments