-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HTTP fetch step on 421. #1141
Conversation
Do we also want to do this if the service worker returns a 421 or only if the network returns one? We should probably have test coverage either way. Also, I think we should cover what should happen for a non-streaming request. Could you also restore the pull request template? |
Both Chrome and Firefox retry only if the network returns 421.
Chrome does this retry during "7.3. Set response to the result of making an HTTP request over connection using request" in 4.6. HTTP-network fetch.
Sure.
Done. |
In https://fetch.spec.whatwg.org/#http-network-or-cache-fetch we have checks for 401 and 407. I think we should handle 421 there as well, in a similar manner. This means that if a service worker creates a 421 the API will see it. Is there any kind of limit on the number of retries? |
Though fetch event is captured by a service worker or not, HTTP-network fetch retries only once. |
The PR description is copied from elsewhere. Please update it. |
What kind of update is needed? |
Updated #http-network-or-cache-fetch after 407 checking. PTAL. |
https://crbug.com/1167013 is a different bug. "N/A as streaming request body has not been implemented" is incorrect for this change because "we should cover what should happen for a non-streaming request." |
Updated the title and the description:
|
I think we should have a dedicated issue for Chromium (for streaming request). |
Done (https://crbug.com/1171011: Fetch streaming upload should fail on a 421 (Misdirected Request) response). |
I think it's okay for the initial version to have something like
as a separate paragraph below the recursive invocation. It's not immediately clear to me if this limit can be exploited in some way, but I guess we'll learn that over time... |
This will also fix #497 and we should note that in the final commit message. |
Added recursion limit and updated the PR description including #497 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation could use some cleanup, but otherwise this looks good to me.
4afaad2
to
361fa3d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, except for the one missing parameter. I have some editorial nits I can push in a fixup commit.
I misunderstood column was in 80 characters instead of 100. |
@yoichio I updated this per the discussion in httpwg/http-core#789. In particular:
Are you willing to update the tests if that seems reasonable? I can also help out. Just let me know. |
LGTM. I'll update the test. |
I rebased this again. So "obtain a connection" now has bypassConnectionPool and dedicated. bypassConnectionPool bypasses the connection pool on lookup, but still stores the result in the connection pool, and dedicated bypasses it completely. Should we organize this differently? @martinthomson who had naming suggestions on the WebTransport PR might have insights here as well. |
One thought I had was to rename this parameter to forceNew to make it clearer it only forces a new connection, nothing else. |
forceNew sounds good to me. |
Thanks @yoichio and @yutakahirano. I'll merge this now and I'll file a bug against Safari so they can consider supporting 421 responses. |
…se., a=testonly Automatic update from web-platform-tests Fetch: tests for 421 responses For whatwg/fetch#1141. -- wpt-commits: ef9bff0647e97e768fa25751b9f60b07b46f61f2 wpt-pr: 27322
…se., a=testonly Automatic update from web-platform-tests Fetch: tests for 421 responses For whatwg/fetch#1141. -- wpt-commits: ef9bff0647e97e768fa25751b9f60b07b46f61f2 wpt-pr: 27322 UltraBlame original commit: 9bb0faecefd9c9f46480722f9946255c2ec8d7a4
…se., a=testonly Automatic update from web-platform-tests Fetch: tests for 421 responses For whatwg/fetch#1141. -- wpt-commits: ef9bff0647e97e768fa25751b9f60b07b46f61f2 wpt-pr: 27322 UltraBlame original commit: 9bb0faecefd9c9f46480722f9946255c2ec8d7a4
…se., a=testonly Automatic update from web-platform-tests Fetch: tests for 421 responses For whatwg/fetch#1141. -- wpt-commits: ef9bff0647e97e768fa25751b9f60b07b46f61f2 wpt-pr: 27322 UltraBlame original commit: 9bb0faecefd9c9f46480722f9946255c2ec8d7a4
Chrome: As-is for non-streaming request. https://crbug.com/1171011 for streaming request.
Firefox: As-is for non-streaming request. N/A as streaming request body has not been implemented
Safari: https://bugs.webkit.org/show_bug.cgi?id=222789 for non-streaming request. N/A as streaming request body has not been implemented
(See WHATWG Working Mode: Changes for more details.)
Fixes #497, #982
Preview | Diff