Skip to content

net/url: inconsistent Parse error with missing port #12200

@mpl

Description

@mpl

go version devel +467a2cb Sun Aug 16 00:29:39 2015 +0000 linux/amd64

http://play.golang.org/p/FkTC5G-xhb

With Go 1.4, this runs without any error.
With the above go version, only the last form ([IPv6]:) fails to parse with the error:
invalid port ":" after host

I would expect either parsing not to fail at all, or to fail for all the URLs without a port after the colon, for consistency.

Is this the desired behaviour ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions