diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index a1ee6cdbbc7777..6f3874b3ecc599 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -755,7 +755,9 @@ class Http2ServerResponse extends Stream { } if (chunk !== null && chunk !== undefined) - this.write(chunk, encoding); + chunk = ''; + + this.write(chunk, encoding); state.headRequest = stream.headRequest; state.ending = true;