Re: [whatwg/fetch] Aborting a fetch: The Next Generation (#447)

> Yes, I think it's indeed important to separate those two, and answer that question. I believe the plan is that it should abort the consumption, but the details on exactly how are not clear. E.g. if the browser has "consumed" a zero-byte response (or just a small response) already, can you still abort() it? Probably not, I would think, but we should define that in detail.

What do you mean by "if the browser has consumed" a small response?  In this snippet:

```
const controller = new FetchController();

fetch(url, { controller.signal }).then(response => {
  controller.abort();
  return response.text();
}).then(text => {
  // do we get here?
}).catch(e => {
  // or here?
});
```

The browser will likely have buffered the entire body text for small or empty bodies when the fetch promise resolves.  So in my distinction from https://github.com/whatwg/fetch/issues/447#issuecomment-293263806 this has completed (1).

I would not say that (2) has happened yet.  The body hasn't been consumed by either the browser or script yet.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/447#issuecomment-293591737

Received on Wednesday, 12 April 2017 14:19:16 UTC