A user has opened an issue that concerns Link parsing.
This issue makes me wonder about the implementation by the ACME clients of the RFC8288 concerning the parsing of these links.
Interesting, thanks for the heads up. I've been using a similar regex to parse the link relation and haven't come across an issue with boulder or pebble.
Your regex change makes sense, but I guess this is just an example of where we should be properly parsing the url instead of using a regex to extract what we need. That is, use go's url parser and extract the relations from the url fragment. EDIT: Thinking about this, it looks like go won't parse these urls properly anyway, so short of rolling your own or using an external url parser which supports these relations, the modified regex might be the easiest solution.
It would be interesting to see what acme server implementation is being used here and how.
I noticed that jillian liked your original post, eggsampler responded to you, and _az liked that response, so it appears that you've already gotten the attention of Let's Encrypt and Certbot. I know that @jsha has been around today and might have something to say here. I'll try to ping some of the ACME client developers that frequent our community to respond if they wish.
For what it's worth, the only time my client currently tries to parse Link headers in a response is when downloading the finalized cert and looking for alternate chains. So my (PowerShell/.NET based) regex is tailored for that scenario rather than more generic Link header parsing.
$reAltLink = '<(?<uri>\S+)>;rel="alternate"'
So it basically captures any non-whitespace characters between the <> characters. But the <> are definitely assumed to be there and wouldn't match if they were missing.