Skip to content

Anchor targets lead to reported warnings #104

@AArnott

Description

@AArnott

Describe the bug

The mlc check reports warnings like this:

Warning: https://aarnott.github.io/Nerdbank.MessagePack/docs/type-shapes.html#witness-classes. Request was redirected to https://aarnott.github.io/Nerdbank.MessagePack/docs/type-shapes.html

The only difference here is the lack of an #anchor at the end of the URL. But in fact a server doesn't redirect from one to the other, because the server never sees the #fragment portion of a URL. I think that the mlc tool is checking in the HTTP response for a header that discloses which URL the server ultimately returned, or maybe an API that retrieves the actual request URI of the last page after redirects. In either case, the #fragment will always be missing. But that doesn't mean it redirected. And in this case, I believe it didn't.

Expected behavior

Can the mlc tool suppress warnings when the 'redirect' is the same URL but without the #fragment?

Additional context

See also #31, which discusses supporting #fragments more fully. But I think that's likely a far more expensive task than simply suppressing a warning in this case.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions