Nano elinks returning a 400 on a valid URL

26 views
Skip to first unread message

Dave Everitt

unread,
Dec 21, 2020, 10:49:29 AM12/21/20
to nanoc
I have a very simple link to a Twitter account in the footer partial of one of the sites I maintain, but on enabling `elinks` on `nanoc deploy` I'm seeing (e.g.):

    [ ERROR ] external_links - broken reference to https://twitter.com/cubeexplorer: 400

Not sure if this is relevant, but in the console error readout (VSCode) the appended colon at the end appears as part of the clickable URL, which obviously gives "not found".

Denis Defreyne

unread,
Dec 27, 2020, 3:44:40 AM12/27/20
to noreply-spamdigest via nanoc
Hey Dave,

I’ve checked this for my own sites as well, and get the same result. When making requests, Twitter indeed responds with a 400, with the body including “<h1>This browser is no longer supported.</h1>”.

I am not sure what can be done to make that work — in my opinion, Twitter should not be blocking unsupported browsers and responding with a 400. (At the risk of sounding pretentious: it’s against the spirit of the web.)

As for running the external_links (a.k.a. elinks) check: I recommend not having it as a deploy-time check, as it’s generally flaky (e.g. it will cause your deploy to fail if some other site is down, misbehaving, or responding slowly). The internal_links (a.k.a. ilinks) check is fine and recommended to run at deploy time.

The colon at the end of the URL is not an issue: it is likely VS Code misinterpreting where the URL ends when making it clickable.

Cheers,

Denis Defreyne
[dəˈni] • pronouns: he/him

--
You received this message because you are subscribed to the Google Groups "nanoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nanoc+un...@googlegroups.com.

Dave Everitt

unread,
Dec 28, 2020, 7:25:19 AM12/28/20
to nanoc
Totally agree about being against the "spirit of the web". Understood about the elinks check at deploy-time being vulnerable to external circumstances! Happy belated Christmas and wishing you (and Nanoc) a better 2021 than 2020 :-)
Reply all
Reply to author
Forward
0 new messages