Skip to content

Hostname format check does not allow single labels #1162

Closed
@swaeberle

Description

@swaeberle

The hostname format checker currently does not allow hostnames without a domain part, hence a single label like localhost is rejected as invalid hostname.
This is caused by class FQDN from fqdn assuming a minimum of two labels.

AFAIK, single labels are not excluded by the RFC 1123 and class FQDN can be forced to accept also single labels in its constructor (min_labels=1).

If rejecting single labels is not the intended behavior, I will send a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething doesn't work the way it should.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions