<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/test/parallel/test-http2-compat-serverresponse-writehead.js, branch test</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>test: refactor common.expectsError</title>
<updated>2019-12-31T14:54:20+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-12-25T17:02:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e038d6a1cdb2ffbf666d360553c31786acaf70b2'/>
<id>e038d6a1cdb2ffbf666d360553c31786acaf70b2</id>
<content type='text'>
This completely refactors the `expectsError` behavior: so far it's
almost identical to `assert.throws(fn, object)` in case it was used
with a function as first argument. It had a magical property check
that allowed to verify a functions `type` in case `type` was passed
used in the validation object. This pattern is now completely removed
and `assert.throws()` should be used instead.

The main intent for `common.expectsError()` is to verify error cases
for callback based APIs. This is now more flexible by accepting all
validation possibilites that `assert.throws()` accepts as well. No
magical properties exist anymore. This reduces surprising behavior
for developers who are not used to the Node.js core code base.

This has the side effect that `common` is used significantly less
frequent.

PR-URL: https://github.com/nodejs/node/pull/31092
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This completely refactors the `expectsError` behavior: so far it's
almost identical to `assert.throws(fn, object)` in case it was used
with a function as first argument. It had a magical property check
that allowed to verify a functions `type` in case `type` was passed
used in the validation object. This pattern is now completely removed
and `assert.throws()` should be used instead.

The main intent for `common.expectsError()` is to verify error cases
for callback based APIs. This is now more flexible by accepting all
validation possibilites that `assert.throws()` accepts as well. No
magical properties exist anymore. This reduces surprising behavior
for developers who are not used to the Node.js core code base.

This has the side effect that `common` is used significantly less
frequent.

PR-URL: https://github.com/nodejs/node/pull/31092
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Trivikram Kamat &lt;trivikr.dev@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: do no throw in writeHead if state.closed</title>
<updated>2019-05-18T16:31:13+00:00</updated>
<author>
<name>Matteo Collina</name>
<email>hello@matteocollina.com</email>
</author>
<published>2019-05-13T17:41:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a49ab0f89e2e9d9bf37236d24c61cee9e1a4be0c'/>
<id>a49ab0f89e2e9d9bf37236d24c61cee9e1a4be0c</id>
<content type='text'>
The http1 implementation does not throw if the connection is down.
The http2 compat implementation should do the same.

See: https://github.com/fastify/fastify-http-proxy/issues/51.
See: https://github.com/fastify/fastify/issues/1494.

PR-URL: https://github.com/nodejs/node/pull/27682
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The http1 implementation does not throw if the connection is down.
The http2 compat implementation should do the same.

See: https://github.com/fastify/fastify-http-proxy/issues/51.
See: https://github.com/fastify/fastify/issues/1494.

PR-URL: https://github.com/nodejs/node/pull/27682
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: makes response.writeHead return the response</title>
<updated>2019-02-09T15:34:25+00:00</updated>
<author>
<name>Mark S. Everitt</name>
<email>mark.s.everitt@gmail.com</email>
</author>
<published>2019-02-06T22:24:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1aa11e14440dc531a7208128b6416814f7b0964b'/>
<id>1aa11e14440dc531a7208128b6416814f7b0964b</id>
<content type='text'>
Fixes: https://github.com/nodejs/node/issues/25935

PR-URL: https://github.com/nodejs/node/pull/25974
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: https://github.com/nodejs/node/issues/25935

PR-URL: https://github.com/nodejs/node/pull/25974
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: cleanup Http2Stream/Http2Session destroy</title>
<updated>2017-12-18T18:19:21+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2017-12-12T19:34:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=0babd181a0c5d775e62a12b3b04fe4d7654fe80a'/>
<id>0babd181a0c5d775e62a12b3b04fe4d7654fe80a</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/17406
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;

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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/17406
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;

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.
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: near full http1 compatibility, add tests</title>
<updated>2017-10-06T21:04:22+00:00</updated>
<author>
<name>Anatoli Papirovski</name>
<email>apapirovski@mac.com</email>
</author>
<published>2017-10-03T01:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=2da7d9b8207d9c35d199734da75fa2bb15f326b6'/>
<id>2da7d9b8207d9c35d199734da75fa2bb15f326b6</id>
<content type='text'>
Extensive re-work of http1 compatibility layer based on tests in
express, on-finished and finalhandler. Fix handling of HEAD
method to match http1. Adjust write, end, etc. to call writeHead
as in http1 and as expected by user-land modules. Add socket
proxy that instead uses the Http2Stream for the vast majority of
socket interactions. Add and change tests to closer represent
http1 behaviour.

Refs: https://github.com/nodejs/node/pull/15633
Refs: https://github.com/expressjs/express/tree/master/test
Refs: https://github.com/jshttp/on-finished/blob/master/test/test.js
Refs: https://github.com/pillarjs/finalhandler/blob/master/test/test.js
PR-URL: https://github.com/nodejs/node/pull/15702
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extensive re-work of http1 compatibility layer based on tests in
express, on-finished and finalhandler. Fix handling of HEAD
method to match http1. Adjust write, end, etc. to call writeHead
as in http1 and as expected by user-land modules. Add socket
proxy that instead uses the Http2Stream for the vast majority of
socket interactions. Add and change tests to closer represent
http1 behaviour.

Refs: https://github.com/nodejs/node/pull/15633
Refs: https://github.com/expressjs/express/tree/master/test
Refs: https://github.com/jshttp/on-finished/blob/master/test/test.js
Refs: https://github.com/pillarjs/finalhandler/blob/master/test/test.js
PR-URL: https://github.com/nodejs/node/pull/15702
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: make --expose-http2 flag a non-op</title>
<updated>2017-09-28T05:01:06+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2017-09-21T17:07:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=f55ee6e24a4073be42957bd9dbeb8b2591544143'/>
<id>f55ee6e24a4073be42957bd9dbeb8b2591544143</id>
<content type='text'>
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 &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Ali Ijaz Sheikh &lt;ofrobots@google.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Ali Ijaz Sheikh &lt;ofrobots@google.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: cleanup of h2 compat layer, add tests</title>
<updated>2017-09-12T14:13:23+00:00</updated>
<author>
<name>Anatoli Papirovski</name>
<email>apapirovski@mac.com</email>
</author>
<published>2017-09-12T11:39:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=c981483686be11980908ebebe77723ae95d05b86'/>
<id>c981483686be11980908ebebe77723ae95d05b86</id>
<content type='text'>
Remove unnecessary variable assignments, remove unreachable code
pathways, remove path getter and setter, and other very minor
cleanup. Only remove reference to stream on nextTick so that
users and libraries can access it in the finish event.

Fixes: https://github.com/nodejs/node/issues/15313
Refs: https://github.com/expressjs/express/pull/3390
PR-URL: https://github.com/nodejs/node/pull/15254
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unnecessary variable assignments, remove unreachable code
pathways, remove path getter and setter, and other very minor
cleanup. Only remove reference to stream on nextTick so that
users and libraries can access it in the finish event.

Fixes: https://github.com/nodejs/node/issues/15313
Refs: https://github.com/expressjs/express/pull/3390
PR-URL: https://github.com/nodejs/node/pull/15254
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: add crypto check to http2 tests</title>
<updated>2017-08-08T22:30:46+00:00</updated>
<author>
<name>Daniel Bevenius</name>
<email>daniel.bevenius@gmail.com</email>
</author>
<published>2017-08-07T05:54:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1b719fe3d78e35a494151229b014ebed6a8383bf'/>
<id>1b719fe3d78e35a494151229b014ebed6a8383bf</id>
<content type='text'>
When building --without-ssl and running the tests some of the http2 test
fail with the following error message:

internal/util.js:82
    throw new errors.Error('ERR_NO_CRYPTO');
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
    at Object.assertCrypto (internal/util.js:82:11)
    at internal/http2/core.js:5:26
    at NativeModule.compile (bootstrap_node.js:586:7)
    at NativeModule.require (bootstrap_node.js:531:18)
    at http2.js:17:5
    at NativeModule.compile (bootstrap_node.js:586:7)
    at Function.NativeModule.require (bootstrap_node.js:531:18)
    at Function.Module._load (module.js:449:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)

This commit adds hasCrypto checks and skips the tests if there is no
crypto support.

PR-URL: https://github.com/nodejs/node/pull/14657
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When building --without-ssl and running the tests some of the http2 test
fail with the following error message:

internal/util.js:82
    throw new errors.Error('ERR_NO_CRYPTO');
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
    at Object.assertCrypto (internal/util.js:82:11)
    at internal/http2/core.js:5:26
    at NativeModule.compile (bootstrap_node.js:586:7)
    at NativeModule.require (bootstrap_node.js:531:18)
    at http2.js:17:5
    at NativeModule.compile (bootstrap_node.js:586:7)
    at Function.NativeModule.require (bootstrap_node.js:531:18)
    at Function.Module._load (module.js:449:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)

This commit adds hasCrypto checks and skips the tests if there is no
crypto support.

PR-URL: https://github.com/nodejs/node/pull/14657
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: make writeHead behave like HTTP/1.</title>
<updated>2017-08-04T19:57:04+00:00</updated>
<author>
<name>Matteo Collina</name>
<email>hello@matteocollina.com</email>
</author>
<published>2017-07-24T18:04:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=78cd5fedd560eef8a17d0a63d32515ef2349f671'/>
<id>78cd5fedd560eef8a17d0a63d32515ef2349f671</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: add range support for respondWith{File|FD}</title>
<updated>2017-08-04T19:56:45+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2017-07-22T16:20:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=d6a774b1bd2c7ccbd783b06a95f6eeeb8dca210c'/>
<id>d6a774b1bd2c7ccbd783b06a95f6eeeb8dca210c</id>
<content type='text'>
* respondWithFD now supports optional statCheck
* respondWithFD and respondWithFile both support offset/length for
  range requests
* Fix linting nits following most recent update

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* respondWithFD now supports optional statCheck
* respondWithFD and respondWithFile both support offset/length for
  range requests
* Fix linting nits following most recent update

PR-URL: https://github.com/nodejs/node/pull/14239
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
