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

Define data: URLs #579

Merged
merged 18 commits into from
Jan 31, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6074,6 +6074,11 @@ that RFC's normative processing requirements to be compatible with deployed cont
<li><p>Let <var>mimeType</var> be the result of <a>collecting a sequence of code points</a> that
are not equal to U+002C (,), given <var>position</var>.

<li>
<p><a>Strip leading and trailing ASCII whitespace</a> from <var>mimeType</var>.

<p class="note">This will only remove U+0020 <a>code points</a>, if any.

<li><p>If <var>position</var> is past the end of <var>input</var>, then return failure.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no tests that hit this condition.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I added some.


<li><p>Advance <var>position</var> by 1.
Expand All @@ -6084,8 +6089,7 @@ that RFC's normative processing requirements to be compatible with deployed cont

<li>
<p>If <var>mimeType</var> ends with U+003B (;), followed by zero or more U+0020 SPACE, followed by
an <a>ASCII case-insensitive</a> match for "<code>base64</code>", followed by zero or more U+0020
SPACE, then:
an <a>ASCII case-insensitive</a> match for "<code>base64</code>", then:

<ol>
<li><p>Let <var>stringBody</var> be the <a>isomorphic decode</a> of <var>body</var>.
Expand All @@ -6094,16 +6098,14 @@ that RFC's normative processing requirements to be compatible with deployed cont

<li><p>If <var>body</var> is failure, then return failure.

<li><p>Remove trailing U+0020 SPACE <a>code points</a> from <var>mimeType</var>, if any.

<li><p>Remove the last 6 <a>code points</a> from <var>mimeType</var>.

<li><p>Remove trailing U+0020 SPACE <a>code points</a> from <var>mimeType</var>, if any.

<li><p>Remove the last <a>code point</a> from <var>mimeType</var>.
</ol>

<p class="note">The last four steps above are redundant with
<p class="note">The last three steps above are redundant with
<a lt="parse a MIME type">MIME type parsing</a> as that data would end up discarded. It is
removed here as it is not part of the MIME type and MIME type parsing might report errors
out-of-band in the future.
Expand Down