Skip to content

Misleading HTTP2 authority documentation #31827

@szmarczak

Description

@szmarczak

http2.connect(authority[, options][, listener])

According to the HTTP2 spec:

The :authority pseudo-header field includes the authority portion of the target URI ([RFC3986], Section 3.2). The authority MUST NOT include the deprecated userinfo subcomponent for http or https schemed URIs.

authority = [ userinfo "@" ] host [ ":" port ]

So running http2.connect('google.com') should work, but it doesn't:

TypeError [ERR_INVALID_URL]: Invalid URL: google.com

I believe that it should be http2.connect(origin[, options][, listener]).
For example, url.origin returns protocol://authority.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions