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

Missing ABNF for additional headers #142

Open
jub0bs opened this issue Aug 29, 2024 · 3 comments
Open

Missing ABNF for additional headers #142

jub0bs opened this issue Aug 29, 2024 · 3 comments

Comments

@jub0bs
Copy link
Contributor

jub0bs commented Aug 29, 2024

The spec provides no ABNF for the additional headers. This is in contrast with the Fetch standard, which provides ABNF for all the CORS-specific headers.

I believe this absence should be remedied. In particular, the spec should clarify that Access-Control-Request-Private-Network and Access-Control-Allow-Private-Network are singleton fields, not list-based fields (see RFC 9110); this distinction matters in the logic of extract header list values and therefore does matter for implementing of CORS middleware that support PNA.

I suggest the following ABNF:

Access-Control-Request-Private-Network = %s"true" ; case-sensitive
Access-Control-Allow-Private-Network   = %s"true" ; case-sensitive
@jub0bs
Copy link
Contributor Author

jub0bs commented Aug 31, 2024

Related to #132

@annevk
Copy link

annevk commented Aug 31, 2024

Hmm, "extract header list values" is a legacy algorithm that new specifications shouldn't use.

@jub0bs
Copy link
Contributor Author

jub0bs commented Aug 31, 2024

@annevk Interesting. I didn't know that, and whatwg/fetch#814 wasn't on my radar.

Incidentally, I do wish RFC 9110 didn't require recipients to tolerate arbitrarily long OWS around the elements of a list-based field value. As a result, performance suffers in the face of malicious messages containing long OWS.

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