Open
Bug 1417338
Opened 7 years ago
Updated 2 years ago
fetch sets wrong Content-Type header on redirects
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
UNCONFIRMED
People
(Reporter: tozz, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171103003834
Steps to reproduce:
Create a fetch request that submits FormData to a backend that sends a 303 and a Location header.
fetch(url, {
method: 'POST',
credentials: 'same-origin',
body: new FormData(document.getElementById('#form'))
})
Actual results:
The FormData is sent correctly to the server, the Location header is parsed and followed as a GET, but the Content-Type header gets set as "multipart/form-data".
HAR log of the two requests attached.
Expected results:
The GET should not have header Content-Type "multipart/form-data".
Summary: fetch sends empty form data on redirect → fetch sets wrong Content-Type headeron redirects
Summary: fetch sets wrong Content-Type headeron redirects → fetch sets wrong Content-Type header on redirects
Updated•7 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
Updated•7 years ago
|
Blocks: ServiceWorkers-compat
This shows the behavior, surprisingly this also makes Chrome set the content-type on redirect but it doesn't do it on the site production code.
Updated•7 years ago
|
Priority: -- → P3
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•