micrometer-docs
micrometer-docs copied to clipboard
W3C link checker & curl show 404 while browser works
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.

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
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.
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
We upgraded the site, this should be fixed, https://validator.w3.org/checklink seems to be mostly happy too.