Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Receiving data after abort #336

Closed
Shogun147 opened this Issue · 3 comments

2 participants

@Shogun147

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?

@Shogun147

So nothing about this?

@mikeal
Owner

it should be suppressed, this is a bug.

@mikeal
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 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.