Skip to content

ManagedWebSocket doesn't send payloads if _isServer is true #17979

Closed
dotnet/corefx
#10510

Description

@analogrelay

Looks like System.Net.WebSockets.ManagedWebSocket.WriteFrameToSendBuffer fails to actually write the payload if _isServer is set. It copies the payload into the send buffer in the same if-branch that handles masking (which is client-only 😄).

Discovered and fixed this while porting code to ASP.NET, so I'm going to port the fix over to corefx and open a PR.

/cc @stephentoub @Tratcher

Activity

  1. self-assigned this
    on Aug 1, 2016
  2. analogrelay commented on Aug 1, 2016

    @analogrelay
    ContributorAuthor

    Also, the Mask is not properly consumed from the receive buffer so received messages end up with 4 \0 characters at the start. I have a fix for this as well. Just struggling to find where and how to add tests to the corefx code. I'm making progress though 😄

  3. joshfree commented on Aug 2, 2016

    @joshfree
    Member
  4. analogrelay commented on Aug 2, 2016

    @analogrelay
    ContributorAuthor

    FYI I have a PR with the fix: dotnet/corefx#10510

  5. transferred this issue fromdotnet/corefxon Jan 31, 2020
  6. added this to the 1.1.0 milestone on Jan 31, 2020
  7. ghost locked as resolved and limited conversation to collaborators on Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions