CodeGenieApp / CodeGenieApp/serverless-express
both express.static and res.sendFile return wrong binary when serving a zip file
- 主要言語
- JavaScript
- スター
- 5.3k
- フォーク
- 676
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm not using any middleware except express.json and cors.
this is lambda.ts
```
import serverlessExpress from "@codegenie/serverless-express";
import app from "./app";
exports.handler = serverlessExpress({
app,
binaryMimeTypes: ["application/x-zip", "application/zip"],
});
```
I tried with and without specifying `binaryMimeTypes` and with and without the specific first route:
```ts
app.use("/done/ext.zip", (req, res) => {
res.sendFile(path.join(__dirname, "public/ext.zip"));
});
app.use("/done", express.static("public"));
```
コントリビューションガイド
調査の方向性
lambda.ts と app から始め、次に、示されている binaryMimeTypes 設定を使って /done/ext.zip res.sendFile ルートと /done express.static ルートを再現します。Lambda 環境で返された zip のバイト列を public/ext.zip と比較します。両方のルートが有効で破損していない zip ファイルを返せば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- aws, express, javascript, node.js, typescript
- 領域
- api, backend, cloud
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 30/100