background-fetch
background-fetch copied to clipboard
Header equality
- I guess this name is only for local use as it's oddly generic given the niche semantics?
- I'm a little concerned that this doesn't match implementations when multiple headers of the same name are present. Also, even if it does match them, I'd prefer that implementations treat
Etag: x,x
andEtag: x
plusEtag: x
identically. That'd be more in line with the spirit of HTTP.
I guess this name is only for local use as it's oddly generic given the niche semantics?
Hmm, it's kinda meant to be generic. I might move it to the HTML spec to check values when resuming downloads.
I'm a little concerned that this doesn't match implementations
Gotcha. Will switch to combined value.
@annevk if one request has Foo:
with no value, and the other request has no Foo
header, should they be considered equal?
Is https://github.com/WICG/background-fetch/pull/127 good enough when doing header comparison?
That looks okay. To answer your earlier question: Foo
without value and no Foo
are not equivalent. Foo: bar
and Foo
without value (i.e., Foo: bar\r\nFoo: \r\n
) are equivalent to Foo: bar
, per HTTP, but Fetch currently doesn't specify these semantics and I'm not sure to what extent implementations are on board with this.
For a generic concept, "equals" or maybe "is" would be the name I think (see URL Standard for precedent) and as used here it'd be about header values, not headers.
@domenic as we should probably settle on "equals" or "is" at some point in the Infra Standard.