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

Use collect an HTTP quoted string #92

Merged
merged 3 commits into from Nov 28, 2018
Merged

Use collect an HTTP quoted string #92

merged 3 commits into from Nov 28, 2018

Conversation

@annevk
Copy link
Member

@annevk annevk commented Nov 14, 2018

See whatwg/fetch#831.


Preview | Diff

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>.
Copy link
Member

@domenic domenic Nov 20, 2018

Maybe Fetch should have a wrapper algorithm that does the "unneeded" stuff for you?

Copy link
Member

@domenic domenic left a comment

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.

@annevk
Copy link
Member Author

@annevk annevk commented Nov 21, 2018

I ended up adding a flag to the collecting algorithm so you it can have a single return value. It looks reasonably clean now.

Copy link
Member

@domenic domenic left a comment

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>.
Copy link
Member

@domenic domenic Nov 22, 2018

"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.

Copy link
Member Author

@annevk annevk Nov 22, 2018

Previously you recommended <var> when I was using <i> for them.

Copy link
Member

@domenic domenic Nov 22, 2018

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.

@annevk
Copy link
Member Author

@annevk annevk commented Nov 27, 2018

Note to self: this can likely land tomorrow once Fetch is reindexed.

@annevk annevk merged commit 8e9a7dd into master Nov 28, 2018
2 checks passed
@annevk annevk deleted the annevk/http-quoted-string branch Nov 28, 2018
domenic added a commit to jsdom/whatwg-mimetype that referenced this issue Nov 28, 2018
domenic added a commit to jsdom/whatwg-mimetype that referenced this issue Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants