fontbakery icon indicating copy to clipboard operation
fontbakery copied to clipboard

[com.google.fonts/check/description/broken_links] A 403 is not a broken link

Open simoncozens opened this issue 1 year ago • 4 comments

Observed behaviour

The following links are broken in the farticle file:
https://scriptsource.org/scr/Ital (status code: 403)

Expected behaviour

A 403 is fine because it is often used to redirect a "friendly" URL (like the one above) to another URL in the CMS (in this case https://scriptsource.org/cms/scripts/page.php?item_id=script_detail&key=Ital).

Also it shouldn't say farticle.

simoncozens avatar Jun 11 '24 07:06 simoncozens

403 is HTTP Error: Forbidden. Are you sure this is used for redirects? I have never heard of that and it does not sound right to me.

Is this specific site generating an invalid HTTP code?

Or, if this is actually a common practice, then how would we distinguish it from actual "error forbidden" pages?

felipesanches avatar Jun 20 '24 21:06 felipesanches

I misdiagnosed this.

In the browser, https://scriptsource.org/scr/Ital gives a redirect, but from a requests request, it gives a 403. We need to be better at faking being a browser...

simoncozens avatar Jun 21 '24 15:06 simoncozens

@felipesanches @simoncozens

I have these cases:

🔥 FAIL Does DESCRIPTION file contain broken links? The following links are broken in the article file: https://scriptsource.org/scr/Mong (status code: 403) https://en.wiktionary.org/wiki/Category:Uyghurjin_script (status code: 404) [code: broken-links]

And I guess we will ignore them. Could we make some exceptions or at least change it to a WARN instead a FAIL?

emmamarichal avatar Jul 31 '24 13:07 emmamarichal

The 403 is fine, will look at the 404.

simoncozens avatar Jul 31 '24 13:07 simoncozens