Skip to content

HTTP2 Server Upgrade listener undocumented #31709

@najibghadri

Description

@najibghadri
  • All versions that have HTTP2 and HTTPS* implemented
  • Documentation problem

The code below shows what is up. I wonder what could be the reason that it works even-tough it is undocumented even in the typescript definitions that come with npm.
I would say this is due to C++ inheritance from HTTPServer to HTTPSServer and HTTP2Server, but no idea, someone could look into it to make sure.

const server = http2.createServer({
  allowHTTP1: true
});

server.on('upgrade', (request, socket, head) => {
  // This does work, but no documentation anywhere (internet, TS definitions, ancestor classes neither)
  // (One could add as ws upgrade handler here)
});

Edit: apparently it is undocumented in the node HTTPS Server as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.http2Issues or PRs related to the http2 subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions