http2: small fixes to compatibility layer
This is some assorted work on the compatibility layer that doesn't warrant its own PRs:
- Expand argument validation through compat API
- adjust behaviour of
response.end
to not throw if stream already closed to match http1 - adjust behaviour of
response.writeContinue
to not throw if stream already closed and other very small tweaks - Add tests for added and fixed behaviour
- Add tests for edge case behaviours of setTimeout, createPushResponse, destroy, end and trailers
I'll add some additional comments on the code itself, so see below for those.
As always, happy to implement any feedback. Thanks in advance~
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
http2, test