htmltest icon indicating copy to clipboard operation
htmltest copied to clipboard

Ignore schema URIs when testing external links

Open samwilson opened this issue 2 years ago • 0 comments

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 avatar May 04 '22 06:05 samwilson