Skip to content

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Oct 7, 2025

Follow-up to #37713, part of #37676.

There's two main behaviour changes in WHATWG:

Invalid URLs throw an exception: When a proxy URL is missing protocols, we default it to HTTP. WHATWG by default throws an exception. To prevent that, i've extended our defaulting to the httpRequest routine. Picking HTTP as the default protocol is inline with our previous behaviour - the prior version of https-proxy-agent picked the protocol based on secureProxy, and we chose false when there's no protocol defined. We also have lots of coverage on this in proxy.spec.ts.
Unspecified or default segments are represented as empty string: I'm assuming that https-proxy-agent knows how to handle that, so I haven't made any further changes.

I also had my Copilot double-check the code and verify the behaviour changes.

Prompt
look at my diff. i've updated the httpsproxyagent library and it now supports WHATWG
URL, so i'd like to transition there. There's a couple of behaviour differences
between WHATWG URL and url.parse and I want to ensure we don't regress. please
carefully examine my diff and counter-check the behaviour of the two APIs to ensure
we're not regressing.

@Skn0tt Skn0tt requested a review from dgozman October 7, 2025 09:01
@Skn0tt Skn0tt self-assigned this Oct 7, 2025
@Skn0tt Skn0tt marked this pull request as ready for review October 7, 2025 09:02

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Oct 7, 2025

Test results for "tests 1"

1 failed
❌ [playwright-test] › runner.spec.ts:118 › should ignore subprocess creation error because of SIGINT @macos-latest-node18-1

3 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1079 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node18`
⚠️ [firefox-library] › library/inspector/cli-codegen-pick-locator.spec.ts:35 › should update locator highlight `@firefox-ubuntu-22.04-node18`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:397 › should work behind reverse proxy `@macos-latest-node18-1`

46927 passed, 816 skipped


Merge workflow run.

@Skn0tt Skn0tt merged commit 9f3fce1 into microsoft:main Oct 8, 2025
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants