Skip to content

fix(routing): match ws(s) baseURL rewrite case-insensitively#41557

Merged
Skn0tt merged 1 commit into
microsoft:mainfrom
chatman-media:fix-ws-baseurl-case
Jul 1, 2026
Merged

fix(routing): match ws(s) baseURL rewrite case-insensitively#41557
Skn0tt merged 1 commit into
microsoft:mainfrom
chatman-media:fix-ws-baseurl-case

Conversation

@chatman-media

Copy link
Copy Markdown
Contributor

toWebSocketBaseUrl only rewrote an http(s) baseURL to ws(s) when the scheme happened to be lowercase, so something like baseURL: 'HTTP://x.com' was left as-is and routeWebSocket() / waitForEvent('websocket') would just never match. URI schemes are case-insensitive per RFC 3986, and the rest of urlMatch.ts already treats them that way (see the origin handling a few lines down), so this just brings the ws(s) rewrite in line with that. Added a test with an uppercase HTTP:// baseURL that fails on main and passes with the fix.

toWebSocketBaseUrl() only rewrote http(s) to ws(s) when the scheme was
lowercase, so a baseURL like 'HTTP://x.com' was left untouched and
routeWebSocket()/waitForEvent('websocket') would never match. Schemes
are case-insensitive per RFC 3986, and the rest of urlMatch.ts already
treats them that way, so do the same here.
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

4 failed
❌ [chromium] › mcp/annotate.spec.ts:173 › user-initiated annotate downloads zip with feedback.md @mcp-macos-latest-chromium
❌ [chromium] › mcp/http.spec.ts:349 › client should receive list roots request @mcp-ubuntu-latest-chromium
❌ [firefox] › mcp/dashboard.spec.ts:125 › daemon show: closing page exits the process @mcp-windows-latest-firefox
❌ [webkit] › mcp/http.spec.ts:349 › client should receive list roots request @mcp-ubuntu-latest-webkit

7457 passed, 1132 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

4 flaky ⚠️ [chromium-library] › library/chromium/oopif.spec.ts:282 › should click `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/har-websocket.spec.ts:235 › should attach websocket messages `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/video.spec.ts:337 › screencast › should work for popups `@realtime-time-library-chromium-linux`
⚠️ [firefox-page] › page/page-emulate-media.spec.ts:144 › should keep reduced motion and color emulation after reload `@firefox-ubuntu-22.04-node20`

49225 passed, 1163 skipped


Merge workflow run.

@pavelfeldman

Copy link
Copy Markdown
Member

@microsoft-github-policy-service rerun

@chatman-media

Copy link
Copy Markdown
Contributor Author

@chatman-media please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@Skn0tt Skn0tt merged commit 25e41a6 into microsoft:main Jul 1, 2026
44 of 48 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.

3 participants