last night, i got a message from my friend izzy (@bruxisma) that my atom feed
was broken. xe told me xe was using nom, a cute little tui
feed reader written in golang, and that xe could see the list of posts in my feed but couldn't open
them. so, in my hubris, i cloned it and started looking at how it parses atom feeds: surely my
markup is correct, because it works in my reader! ... right?
(balatro wheel of fortune voice) nope!
the atom rfc isn't exactly clear on whether links must be
absolute. it does say that a link must "be [an] IRI reference" (an iri is just a uri that can have
unicode characters in it) and must "[identify] an alternate
version of the resource described by the containing element". i could see those statements allowing
for links relative to the site root, but thinking about it practically, it absolutely makes sense
that many readers wouldn't bother implementing that feature if they didn't have to: figuring out
what a relative link is relative to sounds like a series of educated guesses that would be very
frustrating to both implement and to use.
izzy even called this out when xe first messaged me, and it just went in one ear and out the other:
Looking at the feed each link isn't a full URL and I'm not sure if that's part of the spec or not,
but having spoken with a few folks that seems to be the case >_>;
so, i changed my feed template to generate absolute links instead of relative ones (thankfully a
really easy change), and of course, it worked. thanks izzy!
so. if you're implementing an rss or atom feed, make your links absolute! and also, listen to your
smart friends before you waste an hour trying to debug a functioning application!
also, i have to say, golang is absolutely dreadful to read, for the purposes of
figuring out what's going on when you run into unexpected behavior. i would selfishly request that
nobody ever write anything in golang again, specifically just so i don't have to read golang ever
again. 🙃
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
last night, i got a message from my friend [izzy (@bruxisma)](https://izzys.casa/) that my atom feed
was broken. xe told me xe was using [nom](https://github.com/guyfedwards/nom), a cute little tui
feed reader written in golang, and that xe could see the list of posts in my feed but couldn't open
them. so, in my hubris, i cloned it and started looking at how it parses atom feeds: surely my
markup is correct, because it works in my reader! ... right?
<small>(balatro wheel of fortune voice)</small> nope!
the [atom rfc](https://www.ietf.org/rfc/rfc4287.txt) isn't exactly clear on whether links _must_ be
absolute. it does say that a link must "be [an] IRI reference" ([an iri is just a uri that can have
unicode characters in it](https://www.ietf.org/rfc/rfc3987.txt)) and must "[identify] an alternate
version of the resource described by the containing element". i could see those statements allowing
for links relative to the site root, but thinking about it practically, it absolutely makes sense
that many readers wouldn't bother implementing that feature if they didn't have to: figuring out
what a relative link is relative _to_ sounds like a series of educated guesses that would be very
frustrating to both implement and to use.
izzy even called this out when xe first messaged me, and it just went in one ear and out the other:
> Looking at the feed each link isn't a full URL and I'm not sure if that's part of the spec or not,
> but having spoken with a few folks that seems to be the case >\_>;
so, i changed my feed template to generate absolute links instead of relative ones (thankfully a
really easy change), and of course, it worked. thanks izzy!
so. if you're implementing an rss or atom feed, make your links absolute! and also, listen to your
smart friends before you waste an hour trying to debug a functioning application!
<small>also, i have to say, golang is <em>absolutely dreadful</em> to read, for the purposes of
figuring out what's going on when you run into unexpected behavior. i would selfishly request that
nobody ever write anything in golang again, specifically just so i don't have to read golang ever
again. 🙃</small>