summaryrefslogtreecommitdiff
path: root/test/parallel/test-http2-client-request-options-errors.js
AgeCommit message (Collapse)Author
2018-04-16http2: refactor how trailers are doneJames M Snell
Rather than an option, introduce a method and an event... ```js server.on('stream', (stream) => { stream.respond(undefined, { waitForTrailers: true }); stream.on('wantTrailers', () => { stream.sendTrailers({ abc: 'xyz'}); }); stream.end('hello world'); }); ``` This is a breaking change in the API such that the prior `options.getTrailers` is no longer supported at all. Ordinarily this would be semver-major and require a deprecation but the http2 stuff is still experimental. PR-URL: https://github.com/nodejs/node/pull/19959 Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2017-12-18http2: cleanup Http2Stream/Http2Session destroyJames M Snell
PR-URL: https://github.com/nodejs/node/pull/17406 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> This is a significant cleanup and refactoring of the cleanup/close/destroy logic for Http2Stream and Http2Session. There are significant changes here in the timing and ordering of cleanup logic, JS apis. and various related necessary edits.
2017-12-11test: replace assert.throws w/ common.expectsErrorAnatoli Papirovski
PR-URL: https://github.com/nodejs/node/pull/17557 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-28http2: make --expose-http2 flag a non-opJames M Snell
Make the `http2` module always available. The `--expose-http2` cli flag is made a non-op PR-URL: https://github.com/nodejs/node/pull/15535 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-09-03http2: adjust error types, test coverageAnatoli Papirovski
Change error types emitted from request and validatePriorityOptions to be TypeError rather than the incorrect RangeError. Add tests to confirm that all errors are thrown as expected (weight, parent, exclusive, silent, endStream and getTrailers). Add test for method CONNECT throwing error on missing :authority or superfluous :scheme and :path. PR-URL: https://github.com/nodejs/node/pull/15109 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>