Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] Make rawBody be the bytes #2215

Merged
merged 16 commits into from
Aug 17, 2021
Prev Previous commit
Next Next commit
ensure rawBody is Uint8Array
  • Loading branch information
JeanJPNM committed Aug 16, 2021
commit 53fc23304a8d636473e822be48ede50eedaa4976
4 changes: 4 additions & 0 deletions packages/kit/src/runtime/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export async function respond(incoming, options, state = {}) {
...incoming,
headers,
body: parse_body(incoming.rawBody, headers),
rawBody:
typeof incoming.rawBody === 'string'
? new TextEncoder().encode(incoming.rawBody)
: incoming.rawBody,
JeanJPNM marked this conversation as resolved.
Show resolved Hide resolved
params: {},
locals: {}
};
Expand Down