[whatwg/fetch] "If signal is not null, then add the following a..." (#668)

https://fetch.spec.whatwg.org/commit-snapshots/36ef3c8aef34ff77ebf713b6498d008fe853034f/#request-class

> If signal is not null, then add the following abort steps to signal:​
> 
> Signal abort on r’s signal\.

I may be reading this wrong, but it appears to me that this implies that r's signal will not have the aborted flag set even if |signal| does.

This doesn't appear to the correct behaviour. For example, test "Signal on request object" https://github.com/w3c/web-platform-tests/blob/0d311189506d0268f62198fde499a7a32fc58c87/fetch/api/abort/general.any.js#L71 expects that a fetch will be aborted if created from a Request that was passed an already-aborted signal.

I think it should be

31. If _signal_ is not null, then
    1. If _signal_’s [aborted flag](https://dom.spec.whatwg.org/#abortsignal-aborted-flag) is set, set _r_'s [signal](https://fetch.spec.whatwg.org/#request-signal)'s [aborted flag](https://dom.spec.whatwg.org/#abortsignal-aborted-flag).
    1. Otherwise, [add the following abort steps](https://dom.spec.whatwg.org/#abortsignal-add) to _signal_:
       1. [Signal abort](https://dom.spec.whatwg.org/#abortsignal-signal-abort) on _r_’s [signal](https://fetch.spec.whatwg.org/#request-signal).

-- 
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/668

Received on Wednesday, 7 February 2018 08:12:47 UTC