micrometer-docs icon indicating copy to clipboard operation
micrometer-docs copied to clipboard

W3C link checker & curl show 404 while browser works

Open dreis2211 opened this issue 3 years ago • 2 comments

Hi,

I was checking a documentation the other day with https://validator.w3.org/checklink that shows 404s basically for every micrometer doc URL that said documentation contains.

image

The same can be reproduced by simply executing a curl command like the following:

curl -I https://micrometer.io/docs/registry/appOptics
HTTP/2 404
...

The exact same URLs work just fine inside a browser.

Maybe you can take a look to improve this and properly return 2xx status codes.

Cheers, Christoph

dreis2211 avatar Jul 28 '22 20:07 dreis2211

Thank you for reporting this. This is due to this issue mentioned in #200 when we moved to GitHub Pages for hosting. We opted for the solution described as "a trick to teach GitHub Pages to handle 404s by redirecting to your index.html page with a custom redirect parameter." We could go with the other option to change how routing is performed to fix the issue you've described. But I believe this would create another issue of changing existing URLs which would break any documentation linking to them. That seems like a much bigger issue.

Given that, I'm not sure how urgent it is to fix this unless we can fix it in a different way that maintains existing URLs. Suggestions and/or pull requests would be welcome.

shakuzen avatar Jul 29 '22 10:07 shakuzen

Not at all urgent. Just annoying to get these false positives on automated toolings like the W3C link checker.

And it's obviously not really adhering to the HTTP spec, but I guess you can't do much about that then

dreis2211 avatar Jul 29 '22 10:07 dreis2211

We upgraded the site, this should be fixed, https://validator.w3.org/checklink seems to be mostly happy too.

jonatan-ivanov avatar Jan 25 '24 22:01 jonatan-ivanov