[whatwg/fetch] Defining Access-Control-Expose-Headers parsing (#827)

This is for #814. There's basically two ways to do this:

1. Get the value.
1. If null, return.
1. Check that value contains only token or comma. Return if it contains anything outside that range.
1. Split on comma.
1. Trim tab or space and ignore empty values. (Chrome doesn't do this, possibly due to https://bugs.chromium.org/p/chromium/issues/detail?id=896233 @MattMenke2. See https://github.com/web-platform-tests/wpt/pull/13849 for tests.)
1. Now we have values.

Or say something about parsing per the ABNF:

1. Get the value.
1. Parse value per the ABNF for Access-Control-Expose-Headers. (Link it? Inline the ABNF? What's the return value of parsing per ABNF?)
1. Now we have values.

(This doesn't always work since some stuff isn't really parsed per ABNF per se, but just literally compared or parsed differently due to compatibility reasons, but it could maybe work here, except it seems less clear to me and it's not entirely clear how ABNF maps to data structures and stuff.)

cc @mnot 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/827

Received on Thursday, 1 November 2018 15:59:36 UTC