Skip to content

Nested HTTP/2 pushStream fails with error#19095

@robbie-mac

Description

@robbie-mac

Version: 9.7.1
Platform: 64-bit (Windows)
Subsystem: http/2

//server = http2.createSecureServer(); init code removed for brevityserver.addListener('stream',function(stream,headers){letresourcePath=path.join(serverRootPath,headers[HTTP2_HEADER_PATH]);stream.respondWithFile(resourcePath,{'content-type': mimeTypes.get(resourcePath.match(mimeRegExp)[0]),});letpushResourcePath=<fullpathtopushedresource>; stream.pushStream({':path': pushResourcePath}, {'parent': stream.id}, (err, stream, headers) =>{stream.respondWithFile(path.join(serverRoot,pushResourcePath),{'content-type': mimeTypes.get(path.join(serverRoot,pushResourcePath).match(mimeRegExp)[0]),});letsubPushResourcePath=<fullpathtosubpushedresource>; stream.pushStream({':path': subPushResourcePath}, {'parent': stream.id}, (err, stream, headers) =>{stream.respondWithFile(path.join(serverRoot,subPushResourcePath),{'content-type': mimeTypes.get(path.join(serverRoot,subPushResourcePath).match(mimeRegExp)[0]),});}); });});

The nested pushStream callback argument (err) is populated with this:

{Error [ERR_HTTP2_ERROR]: Invalid argument at ServerHttp2Stream.pushStream (internal/http2/core.js:2095:17) at file:///D:/http2_experimental_server/src/server.mjs:106:24 at process._tickCallback (internal/process/next_tick.js:114:19) code: 'ERR_HTTP2_ERROR', name: 'Error [ERR_HTTP2_ERROR]', errno: -501 } 

Metadata

Metadata

Assignees

No one assigned

    Labels

    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