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

Headers and Body not being assigned to the ServerlessRequest in NodeJS v19.1.0 #581

Open
RHJesse opened this issue Nov 20, 2022 · 2 comments

Comments

@RHJesse
Copy link

RHJesse commented Nov 20, 2022

When making a request in NodeJS v19.1.0 the request headers and body don't get passed through correctly. After some debugging I've narrowed it down to this Object.assign in the request constructor: https://github.com/vendia/serverless-express/blob/mainline/src/request.js#L18

When making a request on Node v16.18.1 or v18.12.1 it's fine, but v19.1.0 it doesn't work, both the test header and all other headers aren't being assigned

16.18.1
NodeJS v16 18 1

18.12.1
NodeJS v18 12 1

19.1.0
NodeJS v19 1 0

Workaround is just to use NodeJS < 19 for now

@dnalborczyk
Copy link

dnalborczyk commented Dec 14, 2022

the change causing this issue was reverted nodejs/node#45510 and released in v19.2.0

v20 will likely break again as this breaking change is being re-introduced.

@brettstack
Copy link
Collaborator

Thanks for the heads up. We'll leave this open for tracking v20. Is there a recommended solution/workaround that will work for Node 14+?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants