Closed
Description
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.