1
- import type { RawHeaders , FormDataEncoderHeaders } from "./util/Headers.js"
2
- import { getStreamIterator } from "./util/getStreamIterator.js"
3
- import { createBoundary } from "./util/createBoundary.js"
4
- import { normalizeValue } from "./util/normalizeValue.js"
5
- import { isPlainObject } from "./util/isPlainObject.js"
6
- import { proxyHeaders } from "./util/proxyHeaders.js"
1
+ import type { FileLike } from "./FileLike.js"
7
2
import type { FormDataLike } from "./FormDataLike.js"
8
- import { isFormData } from "./util/isFormData.js"
3
+ import type { FormDataEncoderHeaders , RawHeaders } from "./util/Headers.js"
4
+ import { chunk } from "./util/chunk.js"
5
+ import { createBoundary } from "./util/createBoundary.js"
9
6
import { escapeName } from "./util/escapeName.js"
10
- import type { FileLike } from "./FileLike .js"
7
+ import { getStreamIterator } from "./util/getStreamIterator .js"
11
8
import { isFile } from "./util/isFile.js"
12
- import { chunk } from "./util/chunk.js"
9
+ import { isFormData } from "./util/isFormData.js"
10
+ import { isPlainObject } from "./util/isPlainObject.js"
11
+ import { normalizeValue } from "./util/normalizeValue.js"
12
+ import { proxyHeaders } from "./util/proxyHeaders.js"
13
13
14
14
type FormDataEntryValue = string | FileLike
15
15
@@ -157,7 +157,7 @@ export class FormDataEncoder {
157
157
158
158
// Use default generator when the boundary argument is not present
159
159
if ( ! boundary ) {
160
- boundary = createBoundary ( )
160
+ boundary = `form-data-encoder- ${ createBoundary ( ) } `
161
161
}
162
162
163
163
if ( typeof boundary !== "string" ) {
@@ -175,7 +175,7 @@ export class FormDataEncoder {
175
175
this . #CRLF_BYTES = this . #encoder. encode ( this . #CRLF)
176
176
this . #CRLF_BYTES_LENGTH = this . #CRLF_BYTES. byteLength
177
177
178
- this . boundary = boundary ;
178
+ this . boundary = boundary
179
179
this . contentType = `multipart/form-data; boundary=${ this . boundary } `
180
180
181
181
this . #footer = this . #encoder. encode (
0 commit comments