Skip to content

[bug] Sec-WebSocket-Key header accepting longer values than RFC6455 accepts. #617

@andrewhodel

Description

@andrewhodel

I sent a 20 byte value as Sec-WebSocket-Key and everything works fine, but the RFC states that the value must be exactly 16 bytes when decoded from base64!

That's a problem because when I try to use the client I am writing and testing against this websocket server, it fails on another websocket server.

I'm letting you know so we can all follow the RFC.

Describe the bug

A clear and concise description of what the bug is.

Versions

Go version: go version
package version: run git rev-parse HEAD inside the repo

Steps to Reproduce

How can the bug be triggered?

Expected behavior

What output or behaviour were you expecting instead?

Code Snippets

A minimum viable code snippet can be useful! (use backticks to format it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions