Skip to content

Failed to WS_RECV, curl: (56) [WS] invalid reserved bits: 40 #596

@liesauer

Description

@liesauer

Please check the following items and answer all the questions when reporting a bug,
otherwise it will be closed immediately.

  • This is NOT a site-related "bugs", e.g. some site blocks me when using curl_cffi,
    UNLESS you have verified that the reason is imperfect impersonation.
  • A code snippet that can reproduce this bug will be provided, even if it's a one-liner.
  • Version and environment information will be pasted as below.

Describe the bug
everything seems good to me, and the server responses the correct data, but i got Failed to WS_RECV, curl: (56) [WS] invalid reserved bits: 40 error. if i upgrade to 0.12.0b1, i got Failed to WS_RECV, curl: (56) [WS] invalid reserved bits: c1.
Image

To Reproduce

        def on_open(ws: WebSocket):
            ws.send_json({
                "id": 1,
                "method": "server.auth",
                "params": [
                    "",
                    "web"
                ]
            })

        def on_message(ws: WebSocket, message):
            print(message)

        ws = WebSocket(on_open=on_open, on_message=on_message)

        ws.run_forever("wss://perpetual.coinex.com")

Expected behavior
get the correct json data.

Versions

  • OS: win10
  • curl_cffi version 0.11.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions