http2: make http2/compat.write more http/1 compliant
HTTP2ServerResponse.write
would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable
behaviour.
In particular, prior to this PR, write
would throw err
instead of calling destroy(err)
Refs: https://github.com/nodejs/node/issues/29529
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines