Skip to content
Myr

fix(lambda-edge): satisfy Deno lib types for Content-Length body encoding (#5013)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Yusuke Wada · committed by GitHub · parent fce483e · Browse files · 1 file+4 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−1 removed

  • other:+4 added−1 removed

1 file+4 added−1 removed

modified:src/adapter/lambda-edge/handler.ts+4 added-1 removed
166 unmodified lines
167 const rawBody = createBody(method, requestBody)168169 let body: string | Uint8Array<ArrayBuffer> | undefined = rawBody170 if (rawBody !== undefined) {171 const bytes = typeof rawBody === 'string' ? new TextEncoder().encode(rawBody) : rawBody171 const bytes =172 typeof rawBody === 'string'173 ? (new TextEncoder().encode(rawBody) as Uint8Array<ArrayBuffer>)174 : rawBody175 body = bytes176 headers.set('content-length', bytes.length.toString())177 }178
28 unmodified lines