From a1a997d65f67bf096d6a9926eced709df2286a4f Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Thu, 9 Jul 2026 11:43:18 -0400 Subject: [PATCH 1/2] test: fix undici 8.7.0 compatibility --- test/test-download.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/test-download.js b/test/test-download.js index 756142f623..24372afeec 100644 --- a/test/test-download.js +++ b/test/test-download.js @@ -77,6 +77,24 @@ describe('download', function () { let proxyUsed = false const pserver = http.createServer() + // undici tunnels https requests through the proxy with CONNECT, but forwards + // plain http requests to the proxy in absolute-form. Handle both so the test + // works regardless of which path undici picks. + pserver.on('request', (creq, cres) => { + proxyUsed = true + const target = new URL(creq.url) + const proxyReq = http.request({ + host: target.hostname, + port: target.port, + path: target.pathname + target.search, + method: creq.method, + headers: creq.headers + }, (proxyRes) => { + cres.writeHead(proxyRes.statusCode, proxyRes.headers) + proxyRes.pipe(cres) + }) + creq.pipe(proxyReq) + }) pserver.on('connect', (req, clientSocket, head) => { proxyUsed = true const [targetHost, targetPort] = req.url.split(':') From 28bb97b8fefd44ca3f0f87577551f30077e4348a Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Thu, 9 Jul 2026 15:39:02 -0400 Subject: [PATCH 2/2] chore: add 30m timeout to test jobs --- .github/workflows/tests.yml | 2 ++ .github/workflows/visual-studio.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e6ba093821..8b40bb0db5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,6 +60,7 @@ jobs: test-pack: name: Test Pack runs-on: ubuntu-latest + timeout-minutes: 30 steps: - name: Checkout Repository uses: actions/checkout@v7 @@ -111,6 +112,7 @@ jobs: node: 26.x name: ${{ matrix.os }} - ${{ matrix.python }} - ${{ matrix.node }} runs-on: ${{ matrix.os }} + timeout-minutes: 30 env: WASI_VERSION: '25' WASI_VERSION_FULL: '25.0' diff --git a/.github/workflows/visual-studio.yml b/.github/workflows/visual-studio.yml index f7b37ca531..1be08e9a54 100644 --- a/.github/workflows/visual-studio.yml +++ b/.github/workflows/visual-studio.yml @@ -24,6 +24,7 @@ jobs: - os: windows-11-arm msvs-version: 2022 # Fix this when Visual Studio 2025 is released runs-on: ${{ matrix.os }} + timeout-minutes: 30 steps: - name: Checkout Repository uses: actions/checkout@v7