Skip to content

Commit

Permalink
fix(HEAD): revert GET->HEAD migration, net-effect was negative (#29738)
Browse files Browse the repository at this point in the history
Fixes: #29732
  • Loading branch information
pavelfeldman committed Feb 29, 2024
1 parent 6bd7665 commit d9a0034
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/playwright-core/src/utils/network.ts
Expand Up @@ -181,9 +181,8 @@ export async function isURLAvailable(url: URL, ignoreHTTPSErrors: boolean, onLog

async function httpStatusCode(url: URL, ignoreHTTPSErrors: boolean, onLog?: (data: string) => void, onStdErr?: (data: string) => void): Promise<number> {
return new Promise(resolve => {
onLog?.(`HTTP HEAD: ${url}`);
onLog?.(`HTTP GET: ${url}`);
httpRequest({
method: 'HEAD',
url: url.toString(),
headers: { Accept: '*/*' },
rejectUnauthorized: !ignoreHTTPSErrors
Expand Down
2 changes: 1 addition & 1 deletion tests/playwright-test/web-server.spec.ts
Expand Up @@ -662,7 +662,7 @@ test('should check ipv4 and ipv6 with happy eyeballs when URL is passed', async
expect(result.exitCode).toBe(0);
expect(result.passed).toBe(1);
expect(result.output).toContain('Process started');
expect(result.output).toContain(`HTTP HEAD: http://localhost:${port}/`);
expect(result.output).toContain(`HTTP GET: http://localhost:${port}/`);
expect(result.output).toContain('WebServer available');
});

Expand Down

0 comments on commit d9a0034

Please sign in to comment.