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

[browser][websockets][tests] Test failures for subprotocol by URI Query #45583

Closed
kjpou1 opened this issue Dec 4, 2020 · 1 comment · Fixed by #55638
Closed

[browser][websockets][tests] Test failures for subprotocol by URI Query #45583

kjpou1 opened this issue Dec 4, 2020 · 1 comment · Fixed by #55638
Assignees
Labels
arch-wasm WebAssembly architecture area-System.Net
Milestone

Comments

@kjpou1
Copy link
Contributor

kjpou1 commented Dec 4, 2020

Subprotocol support specified by URI query:

                var ub = new UriBuilder(server);
                ub.Query = "subprotocol=" + AcceptedProtocol;

throw the following exception:

  fail: [out of order message from the browser]: http://127.0.0.1:58688/dotnet.js 9661 WebSocket connection to 'ws://corefx-net-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx?subprotocol=CustomProtocol' failed: Error during WebSocket handshake: Unexpected response code: 400
  fail: [FAIL] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: ws://corefx-net-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx)
  info: Assert.True() Failure
  info: Expected: True
  info: Actual:   False
  info:    at System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(Uri server)

subprotocols are supported via websockets options and specifying the subprotocol via the AddSubProtocol method.

cws.Options.AddSubProtocol(AcceptedProtocol);
@kjpou1 kjpou1 added arch-wasm WebAssembly architecture area-System.Net labels Dec 4, 2020
@kjpou1 kjpou1 self-assigned this Dec 4, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Dec 4, 2020
@ghost
Copy link

ghost commented Dec 4, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Subprotocol support specified by URI query:

                var ub = new UriBuilder(server);
                ub.Query = "subprotocol=" + AcceptedProtocol;

  fail: [out of order message from the browser]: http://127.0.0.1:58688/dotnet.js 9661 WebSocket connection to 'ws://corefx-net-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx?subprotocol=CustomProtocol' failed: Error during WebSocket handshake: Unexpected response code: 400
  fail: [FAIL] System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(server: ws://corefx-net-http11.azurewebsites.net/WebSocket/EchoWebSocket.ashx)
  info: Assert.True() Failure
  info: Expected: True
  info: Actual:   False
  info:    at System.Net.WebSockets.Client.Tests.ConnectTest.ConnectAsync_PassNoSubProtocol_ServerRequires_ThrowsWebSocketException(Uri server)

subprotocols are supported via websockets options and specifying the subprotocol via the AddSubProtocol method.

cws.Options.AddSubProtocol(AcceptedProtocol);
Author: kjpou1
Assignees: kjpou1
Labels:

arch-wasm, area-System.Net

Milestone: -

@kjpou1 kjpou1 removed the untriaged New issue has not been triaged by the area owner label Dec 4, 2020
@kjpou1 kjpou1 changed the title [browser][websockets][tests] Test failures for subprotocol by URI query [browser][websockets][tests] Test failures for subprotocol by URI Query Dec 4, 2020
@kjpou1 kjpou1 added this to the 6.0.0 milestone Jan 5, 2021
@pavelsavara pavelsavara assigned pavelsavara and unassigned kjpou1 Jun 23, 2021
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jul 14, 2021
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 14, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-System.Net
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants