mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore(webdriver): fix issues when removing header (#12167)
This commit is contained in:
parent
b1d30a6158
commit
bc5af0fcf1
@ -271,6 +271,7 @@ export class BidiHTTPRequest extends HTTPRequest {
|
|||||||
function getBidiHeaders(rawHeaders?: Record<string, unknown>) {
|
function getBidiHeaders(rawHeaders?: Record<string, unknown>) {
|
||||||
const headers: Bidi.Network.Header[] = [];
|
const headers: Bidi.Network.Header[] = [];
|
||||||
for (const [name, value] of Object.entries(rawHeaders ?? [])) {
|
for (const [name, value] of Object.entries(rawHeaders ?? [])) {
|
||||||
|
if (!Object.is(value, undefined)) {
|
||||||
headers.push({
|
headers.push({
|
||||||
name: name.toLowerCase(),
|
name: name.toLowerCase(),
|
||||||
value: {
|
value: {
|
||||||
@ -279,6 +280,7 @@ function getBidiHeaders(rawHeaders?: Record<string, unknown>) {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return headers;
|
return headers;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user