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

Ignore schema URIs when testing external links #190

Open
samwilson opened this issue May 4, 2022 · 0 comments · May be fixed by #193
Open

Ignore schema URIs when testing external links #190

samwilson opened this issue May 4, 2022 · 0 comments · May be fixed by #193
Assignees
Labels

Comments

@samwilson
Copy link

The bug

URIs from schema links do not have to exist, but are being checked by htmltest. For example, the following is a valid schema declaration:

<link rel="schema.PA" href="http://www.pictureaustralia.org/schemas/pa/" />

But it results in an error like this:

example.html
  Get "http://www.pictureaustralia.org/schemas/pa/": dial tcp: lookup www.pictureaustralia.org: no such host --- example.html --> http://www.pictureaustralia.org/schemas/pa/

To Reproduce

Steps to reproduce the behaviour:

  1. Create an HTML file with the <link> line given above.
  2. Run htmltest on it.
  3. See error.

.htmltest.yml

No config file required.

Source files

See above.

Expected behaviour

No error should be raised for schema URIs. In fact, there's no point in even trying to check them. They're namespaces, not retrievable resources.

Actual behaviour

The URI is treated as a URL and checked for existence, and an error is thrown.

Versions

  • OS: Kubuntu 20.04
  • htmltest: 0.16.0
@samwilson samwilson added the bug label May 4, 2022
wjdp added a commit that referenced this issue May 28, 2022
@wjdp wjdp linked a pull request May 28, 2022 that will close this issue
@wjdp wjdp self-assigned this May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants