Skip to content

maxHeaderSize option on HTTPS server is not working #38954

Closed
@SantanM

Description

@SantanM
Darwin Santans-MacBook-Pro.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64
  • Version: v12.19.0
  • Platform: MacOS
  • Subsystem: HTTPS module

What steps will reproduce the bug?

Creating a server using HTTPS module with option maxHeaderSize, like below. While increasing maxHeaderSize, the server still shows 431 error for large header.

const server = https.createServer({
  key: process.env.SSL_PRIVATE_KEY,
  cert: process.env.SSL_PUBLIC_CERT,
  maxHeaderSize: 8192*6
}, app).listen(PORT, () => {
  log.info(`🚀 Approuter started on port ${PORT}`);
console.log(server.maxHeaderSize); // outputs undefined
});

How often does it reproduce? Is there a required condition?

It seems (according to the documentation) the options of HTTP server are applicable to HTTPS, but the value does not seem to work in my case (seeing 431 error always)

What is the expected behavior?

In doing so, I am expecting the large header sent to the server is accepted and does not return 431 error.

What do you see instead?

HTTP 431 error

Additional information

The test cases of maxHeaderSize option are covered only for HTTP Server module and not HTTPS. I don't think it has been tested with HTTPS module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpsIssues or PRs related to the https subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions