Skip to content

Parsing a host that starts with a number #39

Closed
@ethul

Description

@ethul

When parsing a URI with a host that starts with a number; e.g., https://1a.test.com, the parser fails with the error Could not match character '.'. I believe the parser is attempting to parse it as an IP address and failing:

https://github.com/slamdata/purescript-uri/blob/5600a0addaed38688e381f5b96d7f7a870dd88e5/src/Data/URI/Host.purs#L39

If it helps, I noticed the parsing error when upgrading from version 2.0.0 to version 2.0.1. The issue is still present on verson 4.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething that should function correctly isn't.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions