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

Remove FTP support #1166

Merged
merged 2 commits into from
Feb 10, 2021
Merged
Changes from all commits
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
55 changes: 6 additions & 49 deletions fetch.bs
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,11 @@ number.
<p>An <dfn export id=http-scheme>HTTP(S) scheme</dfn> is a <a for=url>scheme</a> that is
"<code>http</code>" or "<code>https</code>".

<p>A <dfn export>network scheme</dfn> is a <a for=url>scheme</a> that is "<code>ftp</code>" or an
<a>HTTP(S) scheme</a>.

<p>A <dfn export>fetch scheme</dfn> is a <a for=url>scheme</a> that is "<code>about</code>",
"<code>blob</code>", "<code>data</code>", "<code>file</code>", or a <a>network scheme</a>.
"<code>blob</code>", "<code>data</code>", "<code>file</code>", or an <a>HTTP(S) scheme</a>.

<p class="note no-backref"><a>HTTP(S) scheme</a>, <a>network scheme</a>, and <a>fetch scheme</a> are
also used by <cite>HTML</cite>. [[HTML]]
<p class="note no-backref"><a>HTTP(S) scheme</a> and <a>fetch scheme</a> are also used by
<cite>HTML</cite>. [[HTML]]

<hr>

Expand Down Expand Up @@ -2218,20 +2215,10 @@ through TLS using ALPN. The protocol cannot be spoofed through HTTP requests in
run these steps:

<ol>
<li><p>Let <var>url</var> be <var>request</var>'s
<a for=request>current URL</a>.

<li><p>Let <var>scheme</var> be <var>url</var>'s
<a for=url>scheme</a>.

<li><p>Let <var>port</var> be <var>url</var>'s
<a for=url>port</a>.

<li><p>If <var>scheme</var> is "<code>ftp</code>" and <var>port</var> is 20 or 21, then
return <b>allowed</b>.
<li><p>Let <var>url</var> be <var>request</var>'s <a for=request>current URL</a>.

<li><p>Otherwise, if <var>scheme</var> is a <a>network scheme</a> and
<var>port</var> is a <a>bad port</a>, then return <b>blocked</b>.
<li><p>If <var>url</var>'s <a for=url>scheme</a> is an <a>HTTP(S) scheme</a> and <var>url</var>'s
<a for=url>port</a> is a <a>bad port</a>, then return <b>blocked</b>.

<li><p>Return <b>allowed</b>.
</ol>
Expand Down Expand Up @@ -3398,14 +3385,6 @@ optionally with a <i>recursive flag</i>, run these steps:
<a for=request>referrer</a> to "<code>no-referrer</code>" or
have it expose less sensitive information.

<li>
<p>If <var>request</var>'s <a for=request>current URL</a>'s <a for=url>scheme</a> is
"<code>ftp</code>", <var>request</var>'s <a for=request>client</a>'s
<a for=environment>creation URL</a>'s <a for=url>scheme</a> is not "<code>ftp</code>", and
<var>request</var>'s <a for=request>reserved client</a> is either null or an
<a for=/>environment</a> whose <a for=environment>target browsing context</a> is a
<a>nested browsing context</a>, then set <var>response</var> to a <a>network error</a>.

<li>
<p>Set <var>request</var>'s <a for=request>current URL</a>'s <a for=url>scheme</a> to
"<code>https</code>" if all of the following conditions are true:
Expand Down Expand Up @@ -3800,28 +3779,6 @@ optionally with a <i>recursive flag</i>, run these steps:

<p>When in doubt, return a <a>network error</a>.

<dt>"<code>ftp</code>"
<dd>
<p>For now, unfortunate as it is, <code>ftp</code> <a for=/>URLs</a> are mostly left as an
exercise for the reader.

<ol>
<li><p>Let <var>body</var> be the result of the user agent obtaining content from
<var>request</var>'s <a for=request>current URL</a> from the network via FTP. [[!RFC959]]

<li><p>Let </var>mime</var> be `<code>application/octet-stream</code>`.

<li><p>If <var>body</var> is the result of the user agent generating a directory listing page for
the result of FTP's LIST command, then set |mime| to `<code>text/ftp-dir</code>`.

<li><p>Return a <a for=/>response</a> whose <a for="response">status message</a> is
`<code>OK</code>`, <a for=response>header list</a> consists of a single <a for=/>header</a>
whose <a for=header>name</a> is `<code>Content-Type</code>` and whose <a for=header>value</a> is
<var>mime</var>, and <a for=response>body</a> is <var>body</var>.
</ol>

<p>When in doubt, return a <a>network error</a>.

<dt><a>HTTP(S) scheme</a>
<dd>
<p>Return the result of performing an <a>HTTP fetch</a>
Expand Down