MCPcopy Index your code
hub / github.com/simstudioai/sim / assertContentLengthWithinLimit

Function assertContentLengthWithinLimit

apps/sim/lib/core/utils/stream-limits.ts:48–57  ·  view source on GitHub ↗
(
  headers: { get(name: string): string | null } | undefined,
  maxBytes: number,
  label: string
)

Source from the content-addressed store, hash-verified

46}
47
48export function assertContentLengthWithinLimit(
49 headers: { get(name: string): string | null } | undefined,
50 maxBytes: number,
51 label: string
52): void {
53 const contentLength = getContentLength(headers)
54 if (contentLength !== null) {
55 assertKnownSizeWithinLimit(contentLength, maxBytes, label)
56 }
57}
58
59export interface ReadFormDataWithLimitRequest {
60 url: string

Callers 9

readMcpJsonBodyWithLimitFunction · 0.90
readJsonBodyWithLimitFunction · 0.90
parseOptionalJsonBodyFunction · 0.90
parseWebhookBodyFunction · 0.90
readExecuteRequestBodyFunction · 0.90
readJsonRpcBodyFunction · 0.90
readAgentMailBodyFunction · 0.90
readFormDataWithLimitFunction · 0.85

Calls 2

getContentLengthFunction · 0.85

Tested by

no test coverage detected