Open damianobarbati opened 4 years ago
I have this bug with http2 module, it does not happen with https module. Not sure whether this is related to https://github.com/dlau/koa-body/issues/154.
http2
https
Node version 12.14.0
12.14.0
To reproduce:
yarn install node -r esm index.js # start curl -k https://localhost -d 'ciao=1' # keep firing requests until it hangs
File package.json:
package.json
{ "dependencies": { "esm": "^3.2.25", "koa": "^2.11.0", "koa-body": "^4.1.1" } }
File index.js:
index.js
import fs from 'fs'; import http2 from 'http2'; import koa from 'koa'; import body from 'koa-body'; const app = new koa(); app.use(body({ multipart: true, formidable: { maxFileSize: '4mb' } })); app.use(async ctx => ctx.body = 'ciao'); const HTTPS = 443; const cert = fs.readFileSync('./ssl/fullchain.pem'); const ca = fs.readFileSync('./ssl/chain.pem'); const key = fs.readFileSync('./ssl/privkey.pem'); http2.createSecureServer({ cert, ca, key }, app.callback()).listen(HTTPS, error => error ? console.error(error) : console.info(`https serving on port ${HTTPS}`));
I have this bug with
http2
module, it does not happen withhttps
module. Not sure whether this is related to https://github.com/dlau/koa-body/issues/154.Node version
12.14.0
To reproduce:
File
package.json
:File
index.js
: