-
Notifications
You must be signed in to change notification settings - Fork 385
Closed
Description
I'm implementing Request class in Chromium.
While I'm writing test codes like the following, I noticed a problem.
var baseRequest = new Request('test.html', {headers: {'X-Test': 'test'}});
var request = new Request(baseRequest, {mode: 'no-cors'});
console.log(request.headers.get('X-Test')) // -> 'test'This request.headers should not have 'X-Test' header, because the mode is no-cors and 'X-Test' is not a simple header.
http://fetch.spec.whatwg.org/#request-class
The Request(input, init) constructor must run these steps:
...
If r's request's mode is no CORS, run these substeps:
- If r's request's method is not a simple method, throw a TypeError.
- Set r's Headers object's guard to request-no-CORS.
I think we should remove non simple headers here.
Is my understanding correct?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels