fix(client-certificates): error response body Content-Length calculation (#31897)

This commit is contained in:
Max Schmitt 2024-07-29 14:39:14 +02:00 committed by GitHub
parent acf5ea0904
commit cc313f3290
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -201,7 +201,7 @@ class SocksProxyConnection {
'HTTP/1.1 503 Internal Server Error',
'Content-Type: text/html; charset=utf-8',
'Content-Length: ' + Buffer.byteLength(responseBody),
'\r\n',
'',
responseBody,
].join('\r\n'));
closeBothSockets();

View File

@ -274,7 +274,7 @@ test.describe('browser', () => {
}],
});
await page.goto(browserName === 'webkit' && platform === 'darwin' ? httpsServer.EMPTY_PAGE.replace('localhost', 'local.playwright') : httpsServer.EMPTY_PAGE);
await expect(page.getByText('Playwright client-certificate error')).toBeVisible();
await expect(page.getByText('Playwright client-certificate error: self-signed certificate')).toBeVisible();
await page.close();
});