CodeGenieApp / CodeGenieApp/serverless-express

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

Open
#581 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.3k
Forks
674
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/request.js at the Object.assign call on line 18, then reproduce the request behavior on Node.js 16.18.1, 18.12.1, and 19.1.0 using the issue's header and body scenario. Done means headers and body are assigned correctly on Node.js 19.1.0 without breaking the reported working versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.