mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-04 16:44:11 +03:00
fix: postDataJSON without Content-Type header (#29918)
Regressed after
38fc74db7c
.
Test coverage: Some tests were failing on the flakiness dashboard
This commit is contained in:
parent
1114c42e44
commit
b158e4ef96
@ -141,7 +141,7 @@ export class Request extends ChannelOwner<channels.RequestChannel> implements ap
|
||||
return null;
|
||||
|
||||
const contentType = this.headers()['content-type'];
|
||||
if (contentType.includes('application/x-www-form-urlencoded')) {
|
||||
if (contentType?.includes('application/x-www-form-urlencoded')) {
|
||||
const entries: Record<string, string> = {};
|
||||
const parsed = new URLSearchParams(postData);
|
||||
for (const [k, v] of parsed.entries())
|
||||
|
Loading…
Reference in New Issue
Block a user