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

Conversation

annevk
Copy link
Member

@annevk annevk commented Nov 14, 2018

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

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?

Copy link
Member

@domenic domenic left a 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.

@annevk
Copy link
Member Author

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

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

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.

Copy link
Member Author

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.

Copy link
Member

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.

@annevk
Copy link
Member Author

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
@annevk annevk deleted the annevk/http-quoted-string branch November 28, 2018 09:42
domenic added a commit to jsdom/whatwg-mimetype that referenced this pull request Nov 28, 2018
domenic added a commit to jsdom/whatwg-mimetype that referenced this pull request Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants