Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/visual-studio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- os: windows-11-arm
msvs-version: 2022 # Fix this when Visual Studio 2025 is released

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Checkout Repository
uses: actions/checkout@v7
Expand Down
18 changes: 18 additions & 0 deletions test/test-download.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(':')
Expand Down
Loading