broken-link-checker icon indicating copy to clipboard operation
broken-link-checker copied to clipboard

Reporting 3xx Redirects?

Open KoreMike opened this issue 8 years ago • 7 comments

It appears that 3xx redirects are not reported.

Some companies use a redirect rather than a 404, so this would be useful

KoreMike avatar Jul 20 '17 10:07 KoreMike

A 3xx redirect to where? If it results in a 200, then it was a successful redirect, not a broken route.

stevenvachon avatar Jul 20 '17 13:07 stevenvachon

Another checker which I tried picked up the following link as a 301-'moved permanently' which alerted me to link which no longer works:

http://help-legacy.sap.com/saphelp_hanaplatform/helpdata/en/58/30507afc1a401fb0aef9f6179a4422/content.htm

KoreMike avatar Jul 20 '17 14:07 KoreMike

Ok, but it's not "broken" as it has a successful redirect. Not sure what to call it.

stevenvachon avatar Jul 20 '17 14:07 stevenvachon

Maybe report it just as an 'amber' 301, so people would know it might need investigated?

KoreMike avatar Jul 20 '17 14:07 KoreMike

While a color is good for a UI, I don't think that it's the right word for data.

stevenvachon avatar Jul 20 '17 15:07 stevenvachon

In the terminal, 'OK' is reported in green text Perhaps report 'REDIRECT' in yellow text? And at the end: '4 broken' in red '24 redirects' in yellow?

Maybe reporting redirects could be an option passed in the command?

KoreMike avatar Jul 20 '17 15:07 KoreMike

You're still speaking UI. https://github.com/stevenvachon/broken-link-checker/blob/master/lib/internal/linkObj.js#L53-L56

stevenvachon avatar Jul 20 '17 18:07 stevenvachon