MCPcopy Create free account
hub / github.com/nodejs/node / #validatePayloadLength

Method #validatePayloadLength

deps/undici/undici.js:15450–15456  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15448 this.run(callback);
15449 }
15450 #validatePayloadLength() {
15451 if (this.#maxPayloadSize > 0 && !isControlFrame(this.#info.opcode) && this.#info.payloadLength + this.#fragmentsBytes > this.#maxPayloadSize) {
15452 failWebsocketConnection(this.#handler, 1009, "Payload size exceeds maximum allowed size");
15453 return false;
15454 }
15455 return true;
15456 }
15457 /**
15458 * Runs whenever a new chunk is received.
15459 * Callback is called whenever there are no more chunks buffering,

Callers 1

runMethod · 0.45

Calls 2

isControlFrameFunction · 0.70
failWebsocketConnectionFunction · 0.70

Tested by

no test coverage detected