diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 606eb603bf5..aa11a5d480b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,7 @@ jobs: name: Node.js ${{ matrix.node-version }} - ${{matrix.os}} runs-on: ${{ matrix.os }} + timeout-minutes: 5 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -92,6 +93,7 @@ jobs: permissions: contents: read checks: write + timeout-minutes: 5 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: diff --git a/lib/application.js b/lib/application.js index cf6d78c741e..1291b3294bf 100644 --- a/lib/application.js +++ b/lib/application.js @@ -174,6 +174,18 @@ app.handle = function handle(req, res, callback) { res.locals = Object.create(null); } + if (req.method === 'GET' || req.method === 'HEAD') { + req._dumped = true + req._read() + req._readableState.ended = true + req._readableState.endEmitted = true + + req._readableState.destroyed = true + + req._readableState.closed = true + req._readableState.closeEmitted = true + } + this.router.handle(req, res, done); };