nodejs/undici

undici - next

ronag opened this issue ยท 16 comments

TODO:

  • remove anti-pattern dispatcher hooks
  • remove old interceptor pattern (#2754)
  • new interceptor pattern (#2795)
  • change so that dispatcher hooks take an options object instead of multiple arguments
  • remove pipelining retries from core
  • implement "idempotent" retry interceptor for pipeline resets
  • separate out http2
  • move throwOnError to interceptor
  • move signal handling to interceptor
  • make dump investigate content-length to see if it's worth trying to read
  • move dump to interceptor
  • fix Readable.setEncoding issue (#1125 (comment))
  • [x] non-keep alive connections are not data safe
  • Should we split onHeaders into more fine-grained hooks? i.e. onHeader(key, val) and onStatus(code, message)?

Refs: #2722

With dispatcher hooks do you refer to interceptors?

With dispatcher hooks do you refer to interceptors?

It's methods on Dispatcher, i.e. onHeaders etc...

Some of the above we can probably land on main.

Should we split onHeaders into more fine-grained hooks? i.e. onHeader(key, val) and onStatus(code, message)?

This seems interesting, in theory, the HTTP response is split into three parts, the status line, headers and body; maybe we can follow this line?
See potential use cases, specially around stop request processing if the status is not the one expected

This seems interesting, in theory, the HTTP response is split into three parts, the status line, headers and body; maybe we can follow this line?

it's actually headers first, then status and then body.