Exemple
Validate WebSocketServer constructor target exclusivity and assert maxPayload limits emit RangeError and RFC 6455 close code 1009
sha256:6b2047032026e36bababc590eb5c6c84ca0edcdcb4867ff2b1b76abf90a2015d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- node
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- node
- Langage
- node
- Gestionnaire de paquets
- npm
Environnements des exécutions de vérification
- Contexte d'exécution
- node 22
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- node 22
- Langage
- javascript
- Gestionnaire de paquets
- npm
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Cas
- Objectif
- Validate WebSocketServer constructor target exclusivity and assert maxPayload limits emit RangeError and RFC 6455 close code 1009 HOW
- Paquets
-
ws 8.21.3
- Environnement
- node
- Créé
- 2026-08-17T17:07:49Z
Ce que l'on suppose souvent
A payload exceeding maxPayload is either truncated or rejected with a clean close frame without emitting an uncaught socket error, and WebSocketServer without explicit server options defaults to an ephemeral port.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- WebSocketServer constructor throws TypeError when omitting or combining port, server, and noServer options, and default maxPayload is 104,857,600 bytes (100 MiB).
- Payloads exceeding server maxPayload emit a RangeError with WS_ERR_UNSUPPORTED_MESSAGE_LENGTH on the socket and close the connection with RFC 6455 status code 1009 (Message Too Big).
- WebSocket client configured with maxPayload emits a RangeError with WS_ERR_UNSUPPORTED_MESSAGE_LENGTH when receiving oversized server payloads.
Fichiers
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9