CodeGenieApp / CodeGenieApp/serverless-express

`body` data not passed correctly to the express app

オープン
#654 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
JavaScript
スター
5.3k
フォーク
674
PR マージ指標
30日以内にマージされた PR はありません

説明

Currently, when using express, the req.body data is incorrectly passed to the express application. I am getting the gibberish trash data from somewhere passed into the request. This problem does not exists if I use getCurrentInvoke to get the body data, which will be correct.

Propose to fix this by changing this line here https://github.com/vendia/serverless-express/blob/mainline/src/frameworks/express.js#L2 from app.handle to app, which should solve the issue. See https://github.com/expressjs/express/blob/master/lib/express.js#L38.

Currently I am using express v4, not sure if this will be the case for express v5 or even prior versions.

I will be more than happy to work on this issue (and other issues as a contributor).

Maybe we can make the event & context data not available for the express Request object in the future as well for convenience.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

src/frameworks/express.js の 2 行目から始め、現在の app.handle 参照を Express の lib/express.js の 38 行目と比較してください。Express 4 req.body が getCurrentInvoke を通じて取得した body と一致することを確認し、記載されている Express バージョンの不確実性に対する動作を確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
express, javascript, node.js
領域
api, backend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。