nodules / asker

http.request wrapper with gzip, request retries and http.Agent tuning
MIT License
93 stars 11 forks source link

Gzip response may ignores retry when start buffering response #121

Closed doochik closed 8 years ago

doochik commented 8 years ago

Case:

  1. Request (timeout + retry)
  2. Response (gzip) => start buffering data
  3. Abort request becase timeout
  4. Response get "error" event "Z_BUFF_ERROR" and call .done() https://github.com/nodules/asker/blob/640e66dfb717cd4165af434844ca484828954d2f/lib/asker.js#L528
  5. Actually request will be retried after that but callback has called with error already
narqo commented 8 years ago

:+1:

narqo commented 8 years ago

asker@1.0.4

Flackus commented 8 years ago

:+1: