Skip to content

Commit

Permalink
Merge pull request #22 from Chuiantw1212/bug-15&18
Browse files Browse the repository at this point in the history
set duplex to 'half'
  • Loading branch information
SaltyAom authored Feb 1, 2025
2 parents c217fee + f51eaee commit fe00d71
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ export const nodeRequestToWebstand = (
return _signal
},
// @ts-expect-error
// ? https://github.com/nodejs/node/issues/46221#issuecomment-1426707013
duplex: 'content-length' in req.headers ? true : undefined
duplex: 'half'
})
}

Expand Down Expand Up @@ -349,10 +348,10 @@ export const node = () => {
typeof options === 'number'
? options
: {
...options,
// @ts-ignore
host: options?.hostname
},
...options,
// @ts-ignore
host: options?.hostname
},
() => {
const address = server.address()
const hostname =
Expand Down Expand Up @@ -409,10 +408,10 @@ export const node = () => {
typeof options === 'number'
? options
: {
...options,
// @ts-ignore
host: options?.hostname
}
...options,
// @ts-ignore
host: options?.hostname
}
)
},
requestIP() {
Expand Down Expand Up @@ -448,10 +447,10 @@ export const node = () => {
typeof options === 'object'
? (options as any)
: {
port: options
}
port: options
}
)
} catch {}
} catch { }
})
}
)
Expand Down

0 comments on commit fe00d71

Please sign in to comment.