You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var req = new Request(url, {body: 'hello'});
fetch(req);
fetch(req);
I think we would expect the second fetch() to reject on a drained Request, but it won't. The first fetch() sets the request's used flag to true and its body to null. The second fetch(), however, only looks at the used flag if the body is not null.
Can we simply move the used flag check out of the non-null body clause? Would that miss anything? Over in #61 we talked about introducing an obsolete flag, but I don't really think that's necessary here.
Over in yutakahirano/fetch-with-streams#37 (comment) @yutakahirano noticed that this code may not do what is expected:
I think we would expect the second fetch() to reject on a drained Request, but it won't. The first fetch() sets the request's used flag to true and its body to null. The second fetch(), however, only looks at the used flag if the body is not null.
What do you think @annevk?
The text was updated successfully, but these errors were encountered: