Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webSocketRoute): support no trailing slash #3087

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

mxschmitt
Copy link
Member

Might affect Java as well.

Relates microsoft/playwright-python#2686.

{
globWithBaseURL = new Regex("^http").Replace(globWithBaseURL, "ws");
// Allow http(s) baseURL to match ws(s) urls.
if (!string.IsNullOrEmpty(baseURL) && new Regex("^https?://").IsMatch(baseURL) && new Regex("^wss?://").IsMatch(url))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only replace https -> wss, http-> ws, not https -> ws

@mxschmitt mxschmitt force-pushed the fix-websocket-relatiove branch 2 times, most recently from 755c1e1 to 68913ec Compare December 13, 2024 00:09
@mxschmitt mxschmitt force-pushed the fix-websocket-relatiove branch from 68913ec to 466146e Compare December 13, 2024 00:21
@mxschmitt mxschmitt merged commit 0586b06 into main Dec 13, 2024
14 of 15 checks passed
@mxschmitt mxschmitt deleted the fix-websocket-relatiove branch December 13, 2024 00:46
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