node-fetch/test
Jonathan Stewmon 63d3663466
fix: disambiguate timeout behavior for response headers and body (#770)
There is a single timeout option which applies to both the receiving of
response headers and the receiving of the entire response body. Once
the response is received, the socket timeout must be cleared to allow
the timeout to apply to the receiving of the entire response body.

Without clearing the socket timeout, if the nearing the idle timeout
when the Promise for the body is created, then the request's timeout
handler will abort the request, emitting ERR_STREAM_PREMATURE_CLOSE in
the body Promise.

By clearing the socket timeout once the response headers are received,
the timeout for the entire body can be started when the body is awaited.
Since the request will no longer be aborted by the socket timeout,
destroy is called on the body to prevent it continuing to emit data
events.
2020-05-22 15:19:05 -04:00
..
utils fix: disambiguate timeout behavior for response headers and body (#770) 2020-05-22 15:19:05 -04:00
external-encoding.js drop Babel (while keeping ESM) (#805) 2020-05-21 02:50:31 -04:00
headers.js drop Babel (while keeping ESM) (#805) 2020-05-21 02:50:31 -04:00
main.js fix: disambiguate timeout behavior for response headers and body (#770) 2020-05-22 15:19:05 -04:00
request.js drop Babel (while keeping ESM) (#805) 2020-05-21 02:50:31 -04:00
response.js drop Babel (while keeping ESM) (#805) 2020-05-21 02:50:31 -04:00