Skip to content

Ignore schema URIs when testing external links #190

Open
@samwilson

Description

@samwilson

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions