Skip to content

Why the : before the port in the URI record? #2

@rrichardson

Description

@rrichardson

I see that putting a : character in front of the port is clearly intentional :
https://github.com/haskell/network-uri/blob/master/Network/URI.hs#L602

Two questions:

  1. Could this be a Maybe Int instead of a string? Most URI implementations store this as an integer and it is far more convenient.
    Failing that..
  2. Why is there a : in front of the value? This makes it rather annoying to parse out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions