Location header is the empty string
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 2.3k
- Forks
- 403
- Avg merge
- 21h 16m
- Merged PRs (30d)
- 4
Description
I'm trying to figure out what happens when you do a fetch() in follow mode, and get a 302 response with a Location header whose value is the empty string.
Chrome returns a response with type 'basic', status 302, and a Location header with the empty string. (It also crashes in debug mode.) Firefox returns a network error.
For a similar test where Location is omitted, Chrome returns a response with type 'basic', status 302, and no Location header. Firefox returns the same.
What does the spec say and people think? Here is my proposed WPT test for reference:
https://chromium-review.googlesource.com/c/chromium/src/+/910753
@wanderview
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the Fetch Standard's redirect and Location-header processing, then compare its treatment of an empty value with the Chrome and Firefox behavior described here. Review the proposed WPT test at chromium-review.googlesource.com/c/chromium/src/+/910753; done means the expected behavior is clarified and the test or specification direction is agreed.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100