Skip to content

Commit

Permalink
fix(lite/release): pass "duplex: 'half'" option to tarball request
Browse files Browse the repository at this point in the history
If the body of a request is a stream, we could start receiving the response
before the request has been fully sent (full duplex).
However, Node does not support full duplex. Since other JS runtimes do support
full duplex, Node now requires to pass "duplex: 'half'" for compatibility
concerns with those JS runtimes.

Spec: https://fetch.spec.whatwg.org/#ref-for-dom-requestinit-duplex
WHATWG discussion: whatwg/fetch#1254
Node discussion: nodejs/node#46221
  • Loading branch information
pdonias committed Apr 29, 2024
1 parent a321398 commit e8ba8a9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions @xen-orchestra/lite/scripts/release.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ const ghApiCall = async (path, method = 'GET', data) => {
const ghApiUploadReleaseAsset = async (releaseId, assetName, file) => {
const opts = {
method: 'POST',
duplex: 'half',
body: fs.createReadStream(file),
headers: {
Accept: 'application/vnd.github+json',
Expand Down

0 comments on commit e8ba8a9

Please sign in to comment.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy