Fetch API: Don't DCHECK on a 302 response with a Location header with empty value. #9453
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Blink was failing a DCHECK when it expected a redirect to be taken because
the request mode was 'follow' and the response had a redirect status code
and Location header. However, Chrome's //net considers a Location header
with an empty value to be the same as no Location header at all. See the
comments on bug 810288 about net::HttpResponseHeaders::IsRedirect().
WPT tests are added. The spec is unclear (whatwg/url#373)
but seems to either say to fail with network error or enter a loop of self-redirects
that will eventually hit the redirect limit and fail with network error.
Chrome currently fails this test because it treats the Location as
as non-existent, i.e., not a redirect response.
Bug: 810288,707185
Change-Id: Iaca93976aaa697380b1542ab45d63c318f5050b0
Reviewed-on: https://chromium-review.googlesource.com/910753
Reviewed-by: Yutaka Hirano [email protected]
Reviewed-by: Tsuyoshi Horo [email protected]
Commit-Queue: Matt Falkenhagen [email protected]
Cr-Commit-Position: refs/heads/master@{#536644}