Node v19 has made keep-alive on by default, so using agent: false no longer disables keep-alive. I've fixed the test to handle that, so tests pass with node >= v19.
This also works around the following lint error:
src/connection/UndiciConnection.ts:184:74 - error TS2339: Property 'toLowerCase' does not exist on type 'string | string[]'.
Property 'toLowerCase' does not exist on type 'string[]'.
184 const contentEncoding = (response.headers['content-encoding'] ?? '').toLowerCase()
I'm happy to drop that @ts-expect-error in favour of a more reliable fix there.
Node v19 has made keep-alive on by default, so using
agent: false
no longer disables keep-alive. I've fixed the test to handle that, so tests pass with node >= v19.This also works around the following lint error:
I'm happy to drop that
@ts-expect-error
in favour of a more reliable fix there.