fetch
fetch copied to clipboard
Modify httpRequest’s header list per HTTP.
https://fetch.spec.whatwg.org/#http-network-or-cache-fetch 18
Modify httpRequest’s header list per HTTP.
It is unclear what "list per HTTP" means?
The full step has a bit more detail about what this means, but I suppose that could be made a tad more explicit.
The full step has a bit more detail about what this means
Sorry, where is that?
Step 18 reads as follows:
Modify httpRequest’s header list per HTTP. Do not append a given header if httpRequest’s header list contains that header’s name.
Note: It would be great if we could make this more normative somehow. At this point headers such as
Accept-Encoding
,Connection
,DNT
, andHost
, are to be appended if necessary.
Accept
,Accept-Charset
, andAccept-Language
must not be included at this point.Note:
Accept
andAccept-Language
are already included (unless fetch() is used, which does not include the latter by default), andAccept-Charset
is a waste of bytes. See HTTP header layer division for more details.
That's a little hard to follow IMHO.
"such as" "if necessary" "must not be included " but then says "which does not include the latter by default"
Agreed, it's just somewhat tricky to make this more concrete as it's not clear how to interface with the HTTP specification. But we could probably make that somewhat clearer as a start.
Can we add a link to the corresponding sections in the HTTP spec?
Wait a few weeks; the HTTP specs are about to be revised as new RFCs.
So the relevant spec is not available?
They are, but they are getting a rather significant revision and if we are going to link to anything it would be better to link to that.
They are, but they are getting a rather significant revision and if we are going to link to anything it would be better to link to that.
I see. Could you maybe provide the links here in the issue? So that I can at least figure out what the current revision says.
And maybe where/how we can get notified about the new revisions?
https://datatracker.ietf.org/doc/html/rfc7230 and https://httpwg.org/http-core/draft-ietf-httpbis-semantics-latest.html are relevant. DNT
is defined in https://www.w3.org/TR/tracking-dnt/ and might go away at some point I suppose as it's bee rather useless. And as mentioned in the note being more exhaustive here would be great, but that would require some amount of research into what implementations are doing and how that can be best written down.