Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report permanent redirects as errors in :external_links #1419

Closed
wants to merge 1 commit into from

Conversation

@da2x
Copy link
Contributor

commented Apr 27, 2019

Detailed description

Report permanently redirected links as errors. Anyone concerned with link rot (e.g. anyone running this checker) will want to update their links as redirects tend to go away over time. This is the expected behavior for the 301 and 308 response codes in accordance with RFC 7538 and RFC 7231. I’ve written a wall of text on the subject for anyone who might be interested in the details.

Prior art: The popular (700k installs) Broken Link Checker plugin for WordPress reports on permanent redirects.

To do

  • New behavior is on by default but should this have an off switch? I’d say no.

If required then this should be some generic something to filter out errors by status codes rather than an off switch per check-criteria.

Treat permanent redirects as errors
Report permanently redirected links as errors. In accordance with RFC 7538 and RFC 7231: Requests to permanently redirected URLs should not be repeated and the link should be updated to point to the new location not be repeated and the links should be updated.
@ddfreyne

This comment has been minimized.

Copy link
Member

commented Apr 27, 2019

Looks good!

The style check fails because of a trailing whitespace character — I’ve fixed it and merged manually to master.

@ddfreyne ddfreyne closed this Apr 27, 2019

ddfreyne added a commit that referenced this pull request May 4, 2019

Add missing release note entry for 4.11.3
Previously missing: Report permanent redirects as errors in :external_links (#1419)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.