(size: number, maxBytes: number, label: string)
| 31 | } |
| 32 | |
| 33 | export function assertKnownSizeWithinLimit(size: number, maxBytes: number, label: string): void { |
| 34 | if (Number.isFinite(size) && size > maxBytes) { |
| 35 | throw new PayloadSizeLimitError({ label, maxBytes, observedBytes: size }) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | function getContentLength( |
| 40 | headers: { get(name: string): string | null } | undefined |
no outgoing calls
no test coverage detected