-
Notifications
You must be signed in to change notification settings - Fork 23
Add explicit parsing rules for FETCH integration #87
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
Conversation
Build succeeded, not sure why it still says "failed to build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % nits
It might've been nicer if we could fit some of it into a structured field processing model, but it doesn't seem to fit.
index.html
Outdated
|
||
1. Let |position| be a [=string/position variable=], initially pointing at the start of |field|. | ||
|
||
1. Let |rawName| be the result of [=collecting a sequence of code points=] that are not equal to U+003B (;), given |position|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rephrase that in terms of condition
and input
, similar to how the algorithm is defined?
So something like "...be the result of collecting... from field
meeting the condition of the codepoints not being equal to ;
, given position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to be consistent with FETCH, everything there uses this style:
e.g. https://fetch.spec.whatwg.org/#simple-range-header-value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, just add a "from field
" then, to clarify which string this is reading from.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
index.html
Outdated
|
||
1. Let |rawName| be the result of [=collecting a sequence of code points=] that are not equal to U+003B (;), given |position|. | ||
|
||
1. Let |name| be the result of [=strip leading and trailing ASCII whitespace|stripping=] |rawName|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The algorithm is defined as operating in place rather than returning a result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
index.html
Outdated
|
||
1. Advance |position| by 1. | ||
|
||
1. Let |rawParamName| be the result of [=collecting a sequence of code points=] from |field| that are not equal to U+003D (=), given |position|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
It would have been nice, but it doesn't work with a combination of tokens and quoted strings. |
Will merge once the corresponding FETCH PR is merged, with a ref to the new struct item. |
Co-authored-by: Anne van Kesteren <[email protected]>
For w3c/server-timing#87. (This does not deal with support in trailer fields, that's tracked by w3c/server-timing#68.)
Depends on whatwg/fetch#1406
Closes #42
Closes #55
Closes #69
Preview | Diff