Skip to content

Commit

Permalink
cherry-pick(#29738): fix(HEAD): revert GET->HEAD migration, net-effec…
Browse files Browse the repository at this point in the history
…t was negative
  • Loading branch information
pavelfeldman committed Feb 29, 2024
1 parent 20db86d commit 3f6b641
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 3f6b641

Please sign in to comment.