-
Notifications
You must be signed in to change notification settings - Fork 45
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
Use collect an HTTP quoted string #92
Conversation
mimesniff.bs
Outdated
|
||
<li> | ||
<p>While true: | ||
<p>Set <var>parameterValue</var> and <var>unneeded</var> to the result of | ||
<a>collecting an HTTP quoted string</a> from <var>input</var>, given <var>position</var>. |
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.
Maybe Fetch should have a wrapper algorithm that does the "unneeded" stuff for you?
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.
Implemented and LGTM, although a bit awkward in the implementation. I ended up creating an alternate version of the algorithm which doesn't do the collected
part.
I ended up adding a flag to the collecting algorithm so you it can have a single return value. It looks reasonably clean now. |
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.
Looks great, and confirmed passes all tests.
mimesniff.bs
Outdated
<li><p>Otherwise, <a for=iteration>break</a>. | ||
</ol> | ||
<li><p>Set <var>parameterValue</var> to the result of <a>collecting an HTTP quoted string</a> | ||
from <var>input</var>, given <var>position</var> and the <var>extract-value flag</var>. |
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.
"var" is a bit weird here (e.g. that variable was never declared). But we don't have a good story for flags anyway, so I don't know what to really recommend.
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.
Previously you recommended <var>
when I was using <i>
for them.
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.
At the definition site that makes sense, but at the call site it's weird. But the whole setup has no obviously good answers so anything goes for now.
Note to self: this can likely land tomorrow once Fetch is reindexed. |
…ff#92. No functional changes.
Follows whatwg/mimesniff#92. No functional changes.
See whatwg/fetch#831.
Preview | Diff