Skip to content

Commit

Permalink
Fix websocket close code constants (#144)
Browse files Browse the repository at this point in the history
In undertow, the close codes 1002 and 1003 are swapped compared to the
RFC. This mistake was copied into cask.
  • Loading branch information
Garmelon authored Oct 31, 2024
1 parent 4414c1b commit e7fcba1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cask/util/src/cask/util/Ws.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ object Ws{
case class ChannelClosed() extends Event
object Close{
// Taken from io.undertow.websockets.core.CloseMessage.*
// See also https://datatracker.ietf.org/doc/html/rfc6455#section-7.4
val NormalClosure = 1000
val GoingAway = 1001
val WrongCode = 1002
val ProtocolError = 1003
val ProtocolError = 1002
val WrongCode = 1003
val MsgContainsInvalidData = 1007
val MsgViolatesPolicy = 1008
val MsgTooBig = 1009
Expand Down

0 comments on commit e7fcba1

Please sign in to comment.