• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nats-io / nats.go / 41859808437
86%

Build:
DEFAULT BRANCH: main
Ran 04 Nov 2026 03:43PM UTC
Jobs 1
Files 38
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

04 Nov 2026 03:38PM UTC coverage: 85.796% (+0.04%) from 85.759%
41859808437

push

github

web-flow
[FIXED] Treat malformed WS close frames as protocol errors (#2226)

Also treats unexpected compression as protocol errors.

This mirrors nats-server's handling of three cases the reader accepted silently:

- A close frame with a one-byte payload is a protocol error
  (RFC 6455 section 5.5.1, it was treated as "no status received").

- A close frame carrying a status an endpoint must not send:
  1004, 1005, 1006, 1015, below 1000, 1016-2999, 5000 and above
  (RFC 6455 section 7.4)

- A compressed (RSV1) frame when permessage-deflate was not negotiated was
  decompressed anyway. Frames are only copied out of the read buffer when
  compression is on, so the decompressed output could overwrite a later
  frame still aliasing the buffer and corrupt its data.
  (RFC 6455 section 5.2 requires failing the connection on an unexpected RSV bit).

In all three cases the client now replies with a close frame carrying
status 1002 and a message, and the read ends with that message as the
error. The compression unit tests now mark compression as negotiated, as
the reader is only handed compressed frames when it is.

Signed-off-by: Waldemar Quevedo <wally@nats.io>
Co-authored-by: Claude Mythos 5.1 <noreply@anthropic.com>

21 of 21 new or added lines in 1 file covered. (100.0%)

11 existing lines in 2 files now uncovered.

13186 of 15369 relevant lines covered (85.8%)

50299.65 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
84.15
-1.17% jetstream/ordered.go
5
84.73
-0.14% js.go
Jobs
ID Job ID Ran Files Coverage
1 41859808437.1 04 Nov 2026 03:43PM UTC 38
85.8
GitHub Action Run
Source Files on build 41859808437
  • Tree
  • List 38
  • Changed 7
  • Source Changed 1
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #41859808437
  • d1774d10 on github
  • Prev Build on main (#41673660184)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc