@@ -36,7 +36,7 @@ function extractBody (object, keepalive = false) {
36
36
stream = object
37
37
} else if ( isBlobLike ( object ) ) {
38
38
// 3. Otherwise, if object is a Blob object, set stream to the
39
- // result of running object’ s get stream.
39
+ // result of running object' s get stream.
40
40
stream = object . stream ( )
41
41
} else {
42
42
// 4. Otherwise, set stream to a new ReadableStream object, and set
@@ -87,7 +87,7 @@ function extractBody (object, keepalive = false) {
87
87
// See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490
88
88
// and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100
89
89
90
- // Set source to the result of running the application/x-www-form-urlencoded serializer with object’ s list.
90
+ // Set source to the result of running the application/x-www-form-urlencoded serializer with object' s list.
91
91
source = object . toString ( )
92
92
93
93
// Set type to `application/x-www-form-urlencoded;charset=UTF-8`.
@@ -106,13 +106,13 @@ function extractBody (object, keepalive = false) {
106
106
const boundary = `----formdata-undici-0${ `${ Math . floor ( Math . random ( ) * 1e11 ) } ` . padStart ( 11 , '0' ) } `
107
107
const prefix = `--${ boundary } \r\nContent-Disposition: form-data`
108
108
109
- /*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
109
+ /*! formdata-polyfill. MIT License. Jimmy Warting <https://jimmy.warting.se/opensource> */
110
110
const escape = ( str ) =>
111
111
str . replace ( / \n / g, '%0A' ) . replace ( / \r / g, '%0D' ) . replace ( / " / g, '%22' )
112
112
const normalizeLinefeeds = ( value ) => value . replace ( / \r ? \n | \r / g, '\r\n' )
113
113
114
114
// Set action to this step: run the multipart/form-data
115
- // encoding algorithm, with object’ s entry list and UTF-8.
115
+ // encoding algorithm, with object' s entry list and UTF-8.
116
116
// - This ensures that the body is immutable and can't be changed afterwords
117
117
// - That the content-length is calculated in advance.
118
118
// - And that all parts are pre-encoded and ready to be sent.
@@ -174,10 +174,10 @@ function extractBody (object, keepalive = false) {
174
174
// Set source to object.
175
175
source = object
176
176
177
- // Set length to object’ s size.
177
+ // Set length to object' s size.
178
178
length = object . size
179
179
180
- // If object’ s type attribute is not the empty byte sequence, set
180
+ // If object' s type attribute is not the empty byte sequence, set
181
181
// type to its value.
182
182
if ( object . type ) {
183
183
type = object . type
@@ -200,7 +200,7 @@ function extractBody (object, keepalive = false) {
200
200
}
201
201
202
202
// 11. If source is a byte sequence, then set action to a
203
- // step that returns source and length to source’ s length.
203
+ // step that returns source and length to source' s length.
204
204
if ( typeof source === 'string' || util . isBuffer ( source ) ) {
205
205
length = Buffer . byteLength ( source )
206
206
}
@@ -272,14 +272,14 @@ function cloneBody (body) {
272
272
273
273
// https://fetch.spec.whatwg.org/#concept-body-clone
274
274
275
- // 1. Let « out1, out2 » be the result of teeing body’ s stream.
275
+ // 1. Let « out1, out2 » be the result of teeing body' s stream.
276
276
const [ out1 , out2 ] = body . stream . tee ( )
277
277
const out2Clone = structuredClone ( out2 , { transfer : [ out2 ] } )
278
278
// This, for whatever reasons, unrefs out2Clone which allows
279
279
// the process to exit by itself.
280
280
const [ , finalClone ] = out2Clone . tee ( )
281
281
282
- // 2. Set body’ s stream to out1.
282
+ // 2. Set body' s stream to out1.
283
283
body . stream = out1
284
284
285
285
// 3. Return a body whose stream is out2 and other members are copied from body.
@@ -325,7 +325,7 @@ function bodyMixinMethods (instance) {
325
325
// The blob() method steps are to return the result of
326
326
// running consume body with this and the following step
327
327
// given a byte sequence bytes: return a Blob whose
328
- // contents are bytes and whose type attribute is this’ s
328
+ // contents are bytes and whose type attribute is this' s
329
329
// MIME type.
330
330
return specConsumeBody ( this , ( bytes ) => {
331
331
let mimeType = bodyMimeType ( this )
@@ -373,7 +373,7 @@ function bodyMixinMethods (instance) {
373
373
374
374
const mimeType = contentType !== null ? parseMIMEType ( contentType ) : 'failure'
375
375
376
- // If mimeType’ s essence is "multipart/form-data", then:
376
+ // If mimeType' s essence is "multipart/form-data", then:
377
377
if ( mimeType !== 'failure' && mimeType . essence === 'multipart/form-data' ) {
378
378
const headers = { }
379
379
for ( const [ key , value ] of this . headers ) headers [ key ] = value
@@ -433,7 +433,7 @@ function bodyMixinMethods (instance) {
433
433
434
434
return responseFormData
435
435
} else if ( mimeType !== 'failure' && mimeType . essence === 'application/x-www-form-urlencoded' ) {
436
- // Otherwise, if mimeType’ s essence is "application/x-www-form-urlencoded", then:
436
+ // Otherwise, if mimeType' s essence is "application/x-www-form-urlencoded", then:
437
437
438
438
// 1. Let entries be the result of parsing bytes.
439
439
let entries
@@ -522,15 +522,15 @@ async function specConsumeBody (object, convertBytesToJSValue, instance) {
522
522
}
523
523
}
524
524
525
- // 5. If object’ s body is null, then run successSteps with an
525
+ // 5. If object' s body is null, then run successSteps with an
526
526
// empty byte sequence.
527
527
if ( object [ kState ] . body == null ) {
528
528
successSteps ( new Uint8Array ( ) )
529
529
return promise . promise
530
530
}
531
531
532
- // 6. Otherwise, fully read object’ s body given successSteps,
533
- // errorSteps, and object’ s relevant global object.
532
+ // 6. Otherwise, fully read object' s body given successSteps,
533
+ // errorSteps, and object' s relevant global object.
534
534
await fullyReadBody ( object [ kState ] . body , successSteps , errorSteps )
535
535
536
536
// 7. Return promise.
@@ -541,7 +541,7 @@ async function specConsumeBody (object, convertBytesToJSValue, instance) {
541
541
function bodyUnusable ( body ) {
542
542
// An object including the Body interface mixin is
543
543
// said to be unusable if its body is non-null and
544
- // its body’ s stream is disturbed or locked.
544
+ // its body' s stream is disturbed or locked.
545
545
return body != null && ( body . stream . locked || util . isDisturbed ( body . stream ) )
546
546
}
547
547
@@ -563,7 +563,7 @@ function utf8DecodeBytes (buffer) {
563
563
buffer = buffer . subarray ( 3 )
564
564
}
565
565
566
- // 3. Process a queue with an instance of UTF-8’ s
566
+ // 3. Process a queue with an instance of UTF-8' s
567
567
// decoder, ioQueue, output, and "replacement".
568
568
const output = textDecoder . decode ( buffer )
569
569
0 commit comments