Skip to content

Support for 1014 & Reserved codes #502

@djudd

Description

@djudd

Currently when Tungstenite receives a 1014 close code, for example, it will convert it to a 1002 before surfacing it to the application, because of:

This seems wrong because 1014 appears to be officially recognized as meaning Bad Gateway:
https://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number

But it also seems wrong in general because it means that the library is not future-proof to assignments of additional codes, as happened with 1014. It seems safer to pass through unexpected codes unchanged so that someone wishing to use a newer version of the protocol is not forced to upgrade Tungstenite on every server that will handle the connection.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions