You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found an interesting issue. When using the h2 protocol, res.finished always returns false. Using http/1.1 as a protocol, this does work correctly.
Some sample code to reproduce:
varoptions={spdy: {protocols: ['h2'],// Replace with this to see correct value:// protocols: ['http/1.1'],},};varserver=spdy.createServer(options,function(req,res){res.writeHead(200);res.end('hello world!');console.log('res finished:',res.finished);});server.listen(8080);
In this example, I would expect that the console outputs: res finished: true.
I wanted to try spdy with the sockjs-node package, but that doesn't work because of this issue. Took me a few hours to discover the root cause :).
I've found an interesting issue. When using the
h2
protocol,res.finished
always returnsfalse
. Usinghttp/1.1
as a protocol, this does work correctly.Some sample code to reproduce:
In this example, I would expect that the console outputs:
res finished: true
.I wanted to try spdy with the
sockjs-node
package, but that doesn't work because of this issue. Took me a few hours to discover the root cause :).Also see Node.js documentation about this.
The text was updated successfully, but these errors were encountered: