Skip to content

Commit 4a9b011

Browse files
revert: "fix: extra headers can have duplicates" (#3939)
Reverts #3937 The proposed solution is not compliant with the spec.
1 parent aabd783 commit 4a9b011

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bidiMapper/modules/network/NetworkRequest.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,14 @@ export class NetworkRequest {
339339
if (this.#requestOverrides?.headers) {
340340
const headerMap = new DefaultMap<string, string[]>(() => []);
341341
for (const header of this.#requestOverrides.headers) {
342-
headerMap.get(header.name).push(header.value.value.trim());
342+
headerMap.get(header.name).push(header.value.value);
343343
}
344-
for (const [name, values] of headerMap.entries()) {
344+
for (const [name, value] of headerMap.entries()) {
345345
headers.push({
346346
name,
347347
value: {
348348
type: 'string',
349-
value: values.join(', ').trimEnd(),
349+
value: value.join('\n').trimEnd(),
350350
},
351351
});
352352
}

0 commit comments

Comments
 (0)