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

Redesign of "extract header list values" expected #115

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

Redesign of "extract header list values" expected #115

annevk opened this issue Oct 12, 2018 · 2 comments

Comments

@annevk
Copy link
Member

annevk commented Oct 12, 2018

Hi, I'm planning to change something you use, in whatwg/fetch#814. The new design should be relatively straightforward for you, provided implementations actually use the ABNF for their parsers (and I think there's tests for that for Referrer-Policy).

It would be something like:

  1. Let policyValues be the result of getting Referrer-Policy from response's header list.
  2. If policyValues is non-null, then:
    1. Let policyTokens be the result of parsing policyValues per the 1#(policy-token / extension-token) ABNF.
    2. For each token of policyTokens, ...

Let me know if you have any concerns with this.

@mikewest
Copy link
Member

SGTM.

@annevk
Copy link
Member Author

annevk commented Oct 25, 2021

I think this could use https://fetch.spec.whatwg.org/#concept-header-list-get-decode-split, but I'm not sure what parsers are currently in use for this header.

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