Revert "Add 300 addendum"

This reverts commit 2e508dc78f.
This commit is contained in:
askiiart 2023-12-06 13:05:41 -06:00
parent 2e508dc78f
commit c32c4e29d6
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67
8 changed files with 11 additions and 113 deletions

View file

@ -1,53 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="width=device-width, initial-scale=1" charset="utf-8" />
<link rel="icon" href="/assets/askiiart.gif" type="image/icon">
<title>300 Addendum</title>
<link href="/style.css" type="text/css" rel="stylesheet" />
<link href="/prism.css" rel="stylesheet" />
</head>
<body class="line-numbers">
<h1 id="addendum">300 Addendum</h1>
<p>Still not the movie. Still a nerd.</p>
<hr />
<p>So let's figure out how to add the <code>Link</code> header
for 300 Multiple Choices. As a reminder, <a
href="https://httpwg.org/specs/rfc9110.html#status.300">here's
the spec</a>:</p>
<blockquote>
<p>It is possible to communicate the list using a set of Link
header fields <em><a
href="https://httpwg.org/specs/rfc9110.html#RFC8288">RFC5988</a></em>,
each with a relationship of "alternate", though deployment is a
chicken-and-egg problem.</p>
</blockquote>
<p>So based off some examples for the <code>Link</code> header
in general on <a
href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link">Mozilla's
docs</a>, and for 300 <code>Link</code> headers specifically <a
href="https://http.dev/300">on http.dev</a>, this is how you
make the <code>Link</code> headers for a 300:</p>
<div class="sourceCode" id="cb1"><pre
class="language-txt"><code class="language-default"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a>Link: &lt;/relative/link/like/this&gt;; rel=&quot;alternate&quot;</span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a>Link: &lt;https://site-one.net/blah/blah/blah&gt;; rel=&quot;alternate&quot;</span></code></pre></div>
<p>Unfortunately, there doesn't seem to be an option for
specifying a preferred choice in the <code>Link</code> header.
So I'll just set mine to these:</p>
<div class="sourceCode" id="cb2"><pre
class="language-txt"><code class="language-default"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>Link: &lt;https://git.askiiart.net/askiiart/askiiart-net&gt;; rel=&quot;alternate&quot;</span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>Link: &lt;https://github.com/askiiart/askiiart.github.io&gt;; rel=&quot;alternate&quot;</span></code></pre></div>
<p>And so here's the new nginx config:</p>
<pre class="language-nginx"><code> location /.git {
add_header Location &quot;https://git.askiiart.net/askiiart/askiiart-net&quot;;
add_header Link &#39;&lt;https://git.askiiart.net/askiiart/askiiart-net&gt;; rel=&quot;alternate&quot;; &quot;&#39;;
add_header Link &#39;&lt;https://github.com/askiiart/askiiart.github.io&gt;; rel=&quot;alternate&quot;; &quot;&#39;;
return 300 &#39;&lt;!DOCTYPE html&gt;&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;&lt;meta charset=&quot;utf-8&quot;&gt;&lt;/head&gt;&lt;body&gt;&lt;a href=&quot;https://git.askiiart.net/askiiart/askiiart-net&quot;&gt;Self-hosted&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;https://github.com/askiiart/askiiart-net&quot;&gt;GitHub&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;&#39;;
}</code></pre>
<p><a href="/blog/300.html">Main post</a></p>
<script src="/prism.js"></script>
</body>
<footer>
<p><a href="https://git.askiiart.net/askiiart/askiiart-net">code</a> (<a href="https://github.com/askiiart/askiiart.github.io">mirror</a>)&emsp;<a href="/feed.xml">rss</a>&emsp;<a href="/pubkey.asc">pubkey</a></p>
</footer>
</html>

View file

@ -1,36 +0,0 @@
# 300 Addendum
Still not the movie. Still a nerd.
---
So let's figure out how to add the `Link` header for 300 Multiple Choices. As a reminder, [here's the spec](https://httpwg.org/specs/rfc9110.html#status.300):
> It is possible to communicate the list using a set of Link header fields *[RFC5988](https://httpwg.org/specs/rfc9110.html#RFC8288)*, each with a relationship of "alternate", though deployment is a chicken-and-egg problem.
So based off some examples for the `Link` header in general on [Mozilla's docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link), and for 300 `Link` headers specifically [on http.dev](https://http.dev/300), this is how you make the `Link` headers for a 300:
```txt
Link: </relative/link/like/this>; rel="alternate"
Link: <https://site-one.net/blah/blah/blah>; rel="alternate"
```
Unfortunately, there doesn't seem to be an option for specifying a preferred choice in the `Link` header. So I'll just set mine to these:
```txt
Link: <https://git.askiiart.net/askiiart/askiiart-net>; rel="alternate"
Link: <https://github.com/askiiart/askiiart.github.io>; rel="alternate"
```
And so here's the new nginx config:
```language-nginx
location /.git {
add_header Location "https://git.askiiart.net/askiiart/askiiart-net";
add_header Link '<https://git.askiiart.net/askiiart/askiiart-net>; rel="alternate"; "';
add_header Link '<https://github.com/askiiart/askiiart.github.io>; rel="alternate"; "';
return 300 '<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></head><body><a href="https://git.askiiart.net/askiiart/askiiart-net">Self-hosted</a><br><a href="https://github.com/askiiart/askiiart-net">GitHub</a></body></html>';
}
```
[Main post](/blog/300.html)

View file

@ -114,16 +114,14 @@
9110</a>, again:</p>
<blockquote>
<p>It is possible to communicate the list using a set of Link
header fields <em><a
href="https://httpwg.org/specs/rfc9110.html#RFC8288">RFC5988</a></em>,
header fields <a
href="https://httpwg.org/specs/rfc9110.html#RFC8288">RFC5988</a>,
each with a relationship of "alternate", though deployment is a
chicken-and-egg problem.</p>
</blockquote>
<p><del>I'll probably figure out the <code>Link</code> header
some other time and will add this later, at which point I'll
post an addendum. Until then, bye I guess!</del></p>
<p>Update: <code>Link</code> addendum <a
href="/blog/300-link-addendum.html">here</a>!</p>
<p>I'll probably figure out the <code>Link</code> header some
other time and will add this later, at which point I'll post an
addendum. Until then, bye I guess!</p>
<h2 id="footnotes-and-stuff">Footnotes and stuff</h2>
<h4 id="browser-specific-info">browser-specific info</h4>
<p>Elsewhere in the Quora thread it says, in short, that Firefox

View file

@ -84,11 +84,9 @@ These still don't work, they just return my reverse proxy container's gateway's
Turns out might be a standard way to do it! From [RFC 9110](https://httpwg.org/specs/rfc9110.html#status.300), again:
> It is possible to communicate the list using a set of Link header fields *[RFC5988](https://httpwg.org/specs/rfc9110.html#RFC8288)*, each with a relationship of "alternate", though deployment is a chicken-and-egg problem.
> It is possible to communicate the list using a set of Link header fields [RFC5988](https://httpwg.org/specs/rfc9110.html#RFC8288), each with a relationship of "alternate", though deployment is a chicken-and-egg problem.
~~I'll probably figure out the `Link` header some other time and will add this later, at which point I'll post an addendum. Until then, bye I guess!~~
Update: `Link` addendum [here](/blog/300-link-addendum.html)!
I'll probably figure out the `Link` header some other time and will add this later, at which point I'll post an addendum. Until then, bye I guess!
## Footnotes and stuff

View file

@ -5,7 +5,7 @@
<title>askiiart.net blog</title>
<description>The feed for askiiart.net but just the blog, I guess</description>
<link>https://askiiart.net/blog/</link>
<lastBuildDate>Wed, 06 Dec 2023 18:45:52 +0000</lastBuildDate>
<lastBuildDate>Wed, 06 Dec 2023 17:42:13 +0000</lastBuildDate>
<item>
<title>Marlin Boot Animations</title>
<link>https://askiiart.net/til/marlin-boot-animations.html</link>
@ -14,10 +14,6 @@
<title>300</title>
<link>https://askiiart.net/til/300.html</link>
</item>
<item>
<title>300 Addendum</title>
<link>https://askiiart.net/til/300-link-addendum.html</link>
</item>
</channel>
</rss>

View file

@ -114,9 +114,8 @@ server {
location /.git {
# There is no standard way to present options, but in the rare cases that 300 is used it just has a list of links. The Location header is for preferred thing.
default_type "text/html";
add_header Location "https://git.askiiart.net/askiiart/askiiart-net";
add_header Link '<https://git.askiiart.net/askiiart/askiiart-net>; rel="alternate"; "';
add_header Link '<https://github.com/askiiart/askiiart.github.io>; rel="alternate"; "';
return 300 '<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"></head><body><a href="https://git.askiiart.net/askiiart/askiiart-net">Self-hosted</a><br><a href="https://github.com/askiiart/askiiart-net">GitHub</a></body></html>';
}

View file

@ -5,7 +5,7 @@
<title>askiiart.net</title>
<description>The feed for askiiart.net, I guess</description>
<link>https://askiiart.net</link>
<lastBuildDate>Wed, 06 Dec 2023 18:45:52 +0000</lastBuildDate>
<lastBuildDate>Wed, 06 Dec 2023 17:42:13 +0000</lastBuildDate>
<item>
<title>Marlin Boot Animations</title>
<link>https://askiiart.net/blog/marlin-boot-animations.html</link>
@ -14,10 +14,6 @@
<title>300</title>
<link>https://askiiart.net/blog/300.html</link>
</item>
<item>
<title>300 Addendum</title>
<link>https://askiiart.net/blog/300-link-addendum.html</link>
</item>
<item>
<title>Akkoma in Docker</title>
<link>https://askiiart.net/til/akkoma-in-docker.html</link>

View file

@ -5,7 +5,7 @@
<title>askiiart.net TIL</title>
<description>The feed for askiiart.net but just TIL, I guess</description>
<link>https://askiiart.net/til/</link>
<lastBuildDate>Wed, 06 Dec 2023 18:45:52 +0000</lastBuildDate>
<lastBuildDate>Wed, 06 Dec 2023 17:42:13 +0000</lastBuildDate>
<item>
<title>Akkoma in Docker</title>
<link>https://askiiart.net/til/akkoma-in-docker.html</link>