Skip to content

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

Closed

Description

@kjpou1

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);

Activity

  1. added
    arch-wasm
    on Dec 4, 2020
  2. self-assigned this
    on Dec 4, 2020
  3. added
    untriaged
    on Dec 4, 2020
  4. removed
    untriaged
    on Dec 4, 2020
  5. changed the title [-][browser][websockets][tests] Test failures for subprotocol by URI query[/-] [+][browser][websockets][tests] Test failures for subprotocol by URI Query[/+] on Dec 4, 2020
  6. added this to the 6.0.0 milestone on Jan 5, 2021
  7. ghost added
    in-pr
    on Jul 14, 2021
  8. ghost removed
    in-pr
    on Jul 14, 2021
  9. ghost locked as resolved and limited conversation to collaborators on Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-System.Net

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions