This is a minimal test case showing a bug (specifically, a heisenbug) in node-spdy 4.0.2 when braidify is used.
Run:
yarn install
yarn devcert
You'll need 3 terminals:
- [First Terminal] Start the node-spdy server:
yarn start
- [Second Terminal] Start curl with a Braid 'Subscribe' header:
yarn subscribe
- [Third Terminal] Start a test:
yarn test
The server starts at version 1, and the test creates a version 2 and version 3 via 'PUT'. Note that curl shows version 1 and version 2, but no version 3 appears.
When enabling node-spdy debug output, the above bug disappears:
- [First Terminal] Start the node-spdy server, with DEBUG logs:
DEBUG=spdy:stream:server yarn start
- [Second Terminal] Start curl with a Braid 'Subscribe' header:
yarn subscribe
- [Third Terminal] Start the test:
yarn test
The server starts at version 1, and the test creates a version 2 and version 3 via 'PUT', as before. Now, however, note that the curl terminal shows version 1, 2, AND 3.