From 0cdd3e3733a5c7d6739683ab25b961f4eee3a0b5 Mon Sep 17 00:00:00 2001 From: O4FDev Date: Fri, 5 Sep 2025 07:54:08 +0100 Subject: [PATCH 1/4] feat: dump bodies of get/head reqs --- lib/application.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/application.js b/lib/application.js index cf6d78c741e..ce44ed077d2 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.w = 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); }; From 380f66540cd461cf3ebca31411ce02c51e413ab7 Mon Sep 17 00:00:00 2001 From: Luke Lucas <52675277+O4FDev@users.noreply.github.com> Date: Fri, 5 Sep 2025 09:10:05 +0100 Subject: [PATCH 2/4] Apply suggestion from @ronag Co-authored-by: Robert Nagy --- lib/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/application.js b/lib/application.js index ce44ed077d2..1291b3294bf 100644 --- a/lib/application.js +++ b/lib/application.js @@ -175,7 +175,7 @@ app.handle = function handle(req, res, callback) { } if (req.method === 'GET' || req.method === 'HEAD') { - req.w = true + req._dumped = true req._read() req._readableState.ended = true req._readableState.endEmitted = true From 93846d0e0fe31ee1f82eac8047ce5b31cc6dfe5d Mon Sep 17 00:00:00 2001 From: O4FDev Date: Fri, 5 Sep 2025 09:17:26 +0100 Subject: [PATCH 3/4] chore: ci timeout --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 606eb603bf5..a298532f2c0 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: 10 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: From c330298a6360e6c27915de49dddc5f0b3f9237f2 Mon Sep 17 00:00:00 2001 From: O4FDev Date: Fri, 5 Sep 2025 09:50:25 +0100 Subject: [PATCH 4/4] chore: ci timeout --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a298532f2c0..aa11a5d480b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: name: Node.js ${{ matrix.node-version }} - ${{matrix.os}} runs-on: ${{ matrix.os }} - timeout-minutes: 10 + timeout-minutes: 5 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: @@ -93,6 +93,7 @@ jobs: permissions: contents: read checks: write + timeout-minutes: 5 steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: