-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[fix] adapter-netlify: encode UInt8Array response bodies as base64 #2630
[fix] adapter-netlify: encode UInt8Array response bodies as base64 #2630
Conversation
🦋 Changeset detectedLatest commit: d1acf08 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
If an endpoint returns a UInt8Array body (e.g. for binary content), the function handler will fail as a Netlify function response body needs to be either a string or base64 encoded. Let's encode UInt8Array response bodies as base64 so that endpoints returning UInt8Arrays function properly with the Netlify adapter.
splitHeaders is an internal variable, so it should be snake_cased.
Hi team, since this has been merged into version
The given line in the
I believe more people are going to start having this issue as well. |
I will fix it as soon as I get home |
If an endpoint returns a UInt8Array body (e.g. for binary content), the function handler will fail as a Netlify function response body needs to be either a string or base64 encoded.
Let's encode UInt8Array response bodies as base64 so that endpoints returning UInt8Arrays function properly with the Netlify adapter.