Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header equality #124

Open
annevk opened this issue Oct 2, 2018 · 5 comments
Open

Header equality #124

annevk opened this issue Oct 2, 2018 · 5 comments

Comments

@annevk
Copy link

annevk commented Oct 2, 2018

  1. I guess this name is only for local use as it's oddly generic given the niche semantics?
  2. 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 and Etag: x plus Etag: x identically. That'd be more in line with the spirit of HTTP.
@jakearchibald
Copy link
Collaborator

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.

@jakearchibald
Copy link
Collaborator

@annevk if one request has Foo: with no value, and the other request has no Foo header, should they be considered equal?

@jakearchibald
Copy link
Collaborator

Is #127 good enough when doing header comparison?

@annevk
Copy link
Author

annevk commented Oct 4, 2018

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.

@annevk
Copy link
Author

annevk commented Oct 4, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants