02:52
<Alexander Kalenik>

hey, I ran into issue but not sure if it is fetch spec, navigables spec or me missing something:

Step 19.6 in https://html.spec.whatwg.org/multipage/browsing-the-web.html#create-navigation-params-by-fetching
"6. Otherwise, process the next manual redirect for fetchController."
has a note:
"This will result in calling the processResponse we supplied above, during our first iteration through the loop, and thus setting response."

but when I look into fetch spec it seems like processing of the next manual redirect cannot result in calling processResponse callback because, according to the fetch spec:

  1. process manual redirect is set to https://fetch.spec.whatwg.org/#concept-http-redirect-fetch.
  2. Last step 20 of "HTTP-redirect fetch" calls main fetch with fetchParams and true (true is for "redirect" param, correct?)
  3. https://fetch.spec.whatwg.org/#concept-main-fetch does early return of response on step 13 ("If recursive is true, then return response.") because "HTTP-redirect fetch" passed recursive=true earlier.

https://fetch.spec.whatwg.org/#fetch-finale which is the only place that calls processResponse callback is never reached while processing manual redirect because main fetch did early return because redirect=true param is passed by "HTTP-redirect fetch".

am I missing something?

04:16
<Alexander Kalenik>
I checked fetch spec commit history and in the past instead of "Return the result of running main fetch given fetchParams and true." there was "Return the result of performing a main fetch using request with recursive flag set if request's redirect mode is not manual". Specifying recursive=false if redirect mode is not manual solves the problem that I described above. Not sure why this addition has been removed from spec. Commit that changed the line https://github.com/whatwg/fetch/commit/12dd6fa8ca76bd3bdff0c65a0c5a84b3ca870c3d
16:47
<Dominic Farolino>
Hmm, I think you're right. It seems like HTTP-redirect fetch should not unconditionally call main fetch with "true", and if that's right, then I think this sentence is also wrong: https://fetch.spec.whatwg.org/#ref-for-process-response%E2%91%A2.
18:26
<Alexander Kalenik>
Hmm, I think you're right. It seems like HTTP-redirect fetch should not unconditionally call main fetch with "true", and if that's right, then I think this sentence is also wrong: https://fetch.spec.whatwg.org/#ref-for-process-response%E2%91%A2.
thank you for looking. I created an issue https://github.com/whatwg/fetch/issues/1629. Actually I tried changing HTTP-redirect to set recursive to false for manual redirect mode like it was in the spec before and then processResponse is called like navigation expects. could you share you thoughts on what is wrong with the sentence? for me it looks correct that processReponse should be called again after every next manual redirect.
20:03
<Dominic Farolino>
I think your logic is sound. Changing the last line of http-redirect-fetch to what it used to be seems good, but (1) I'm not sure if doing so would have any unwanted side effects from the steps that would run after https://fetch.spec.whatwg.org/#ref-for-fetch-params-process-response%E2%91%A0, or (2) if the change to the current state was intentional and I'm just missing something ;) Anne is the expert here.