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

This commit is contained in:
Max Schmitt 2024-07-29 14:53:12 +02:00
parent 57c7d9e9bb
commit 185a2867c6
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();
});