Gil Pedersen

Results 191 comments of Gil Pedersen

`stream.pipeline()` could probably be used to simplify the custom pipelining code here: https://github.com/hapijs/hapi/blob/c2107e9bc9c522c3778e90a3629a0c84f776f9fe/lib/transmit.js#L359-L377 Edit: while it can make the code simpler, it will also require extra processing since `stream.pipeline()` is...

> I believe Eran already used private class methods somewhere in the org already. No, only private instance fields, which is supported in node 12 but was still not fully...

I added `AbortSignal` to the list. It seems like a promising way to simplify / unify aborting async code. This is not only interesting for simplifying internal processing, but also...

I did not mention ESM modules. While I think hapi should definitely support these (for user plugins, when imported, and for testing in Lab), I don't think there is an...

So how to tackle this? Most of this can be converted internally without any user-facing changes and essentially only require an updated minimum version of node. Then the actual implementation...

Thanks for the report. Node v16 has a change that causes issues for requests with payloads. We have worked to support it fully, but it seems that it is still...

~~Looking at the docs, hapi does not guarantee that `'disconnect'` is called. In fact the v15 behaviour could be considered a bug:~~ > 'disconnect' - emitted when a request errors...

Hmm, this could be a node bug. It seems that `http.IncomingMessage` no longer emits `'aborted'` events once the payload has been delivered. ~~It also seems that node will now deliver...

There does not appear to be a non-hacky way to work around this issue with node v16+. I have reported the underlying issue here: https://github.com/nodejs/node/issues/40775.

> > It also seems that node will now deliver 'error' emits (with Error: aborted) after the 'close' event! > > Do you have a repro for that? It shouldn't...