Skip to content

linkcheck: netiquette: autoignore RFC2606 reserved domain names#14310

Open
jayaddison wants to merge 8 commits intosphinx-doc:masterfrom
jayaddison:issue-14307/linkcheck-netiquette-autoignore-reserved-domain-names
Open

linkcheck: netiquette: autoignore RFC2606 reserved domain names#14310
jayaddison wants to merge 8 commits intosphinx-doc:masterfrom
jayaddison:issue-14307/linkcheck-netiquette-autoignore-reserved-domain-names

Conversation

@jayaddison
Copy link
Copy Markdown
Contributor

Purpose

I don't think that it is useful for the linkcheck builder to make HTTP requests to the IETF-reserved domain names outlined in RFC2606. This recently came up as a tangential discussion from: #12985 (comment)

This pull request implements some logic to ignore the relevant top-level-domains (TLDs) and second-level domains automatically.

References

Resolves #14307.

In RFC2606, the IETF reserves some domain names for use in local
testing.  Generally we shouldn't allow the Sphinx `linkcheck`
worker to make HTTP requests to these domains, because they are
unlikely to resolve or to respond with success codes following
requests for URL paths that include them.

In addition, some second-level domains (e.g. example.org) are
also reserved in RFC2606, again for similar testing purposes.

This change updates the `linkcheck` worker `is_ignored_uri`
method logic to return true for IETF reserved domain names.

[1] - https://datatracker.ietf.org/doc/html/rfc2606
This indicates a single-param-per-line code style for the method.

(and also fixes a lint error / recommendation from `ruff`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linkcheck: netiquette: auto-ignore IETF-standardised reserved domain names

1 participant