(
headers: { get(name: string): string | null } | undefined,
maxBytes: number,
label: string
)
| 46 | } |
| 47 | |
| 48 | export 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 | |
| 59 | export interface ReadFormDataWithLimitRequest { |
| 60 | url: string |
no test coverage detected