Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Receiving data after abort #336

Closed
Shogun147 opened this Issue · 3 comments

2 participants

Grigore Dutcovici Mikeal Rogers
Grigore Dutcovici

Hi,

I'm using the request as follows:

request({ url: url }).on('response', function(response) {
  // do some sync checks
  // if not ok then this.abort();
}).on('data', function(chunk) {
  // check chunk length ...
}).on('end', function() {
  //...
});

So if i aborted the request then the data event still emits once.

Is this expected thing? i can check the this._aborted on 'data' and ignore that chunk, but why that event is emitted?

Grigore Dutcovici

So nothing about this?

Mikeal Rogers
Owner

it should be suppressed, this is a bug.

Mikeal Rogers
Owner

Is this still an issue?

This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open.

Mikeal Rogers mikeal closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.