`@tus/server` `>= v2.1.0` seems now incompatible with Next.js pages API
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- nextjs, node.js, typescript
調査の方向性
Start with the Next.js pages API handler shown in the reproduction and compare @tus/server v2.0.0 with v2.1.0–v2.3.0, focusing on the srvx integration mentioned in the issue. Reproduce the upload response and verify that Location and the other response headers are returned correctly without the broken single-character headers.
索引モデルが issue の本文から書いたものです。
説明
Initial checklist
- I understand this is a bug report and questions should be posted in the Community Forum
- I searched issues and couldn’t find anything (or linked relevant results below)
Steps to reproduce
Make sure to use between v2.1.0-v2.3.0, and within the pages API router just use :
const tusServer = new Server({
path: '/api/upload',
});
export function handler(req: NextApiRequest, res: NextApiResponse) {
return tusServer.handle(req, res);
}
(as shown in https://uppy.io/docs/nextjs/#pages-router)
And then start uploading a file (using Uppy client aside for example).
Expected behavior
To have Location response header like in:
HTTP/1.1 201 Created
origin-agent-cluster: ?1
referrer-policy: no-referrer
strict-transport-security: max-age=15552000; includeSubDomains
x-content-type-options: nosniff
x-dns-prefetch-control: off
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-nonce: xxxxx
x-permitted-cross-domain-policies: none
x-xss-protection: 0
access-control-allow-origin: http://localhost:3000
access-control-expose-headers: Authorization, Content-Type, Location, Tus-Extension, Tus-Max-Size, Tus-Resumable, Tus-Version, Upload-Concat, Upload-Defer-Length, Upload-Length, Upload-Metadata, Upload-Offset, X-HTTP-Method-Override, X-Requested-With, X-Forwarded-Host, X-Forwarded-Proto, Forwarded
content-type: text/plain;charset=UTF-8
location: http://localhost:3000/api/upload/f1d627f06be68560949c3125d9644381
tus-resumable: 1.0.0
Vary: Accept-Encoding
Date: Mon, 27 Oct 2025 21:20:19 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
Actual behavior
Having no Location response header, and moreover having broken response headers like:
HTTP/1.1 201
1: .
origin-agent-cluster: ?1
referrer-policy: no-referrer
strict-transport-security: max-age=15552000; includeSubDomains
x-content-type-options: nosniff
x-dns-prefetch-control: off
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-nonce: xxxxxxxxx
x-permitted-cross-domain-policies: none
x-xss-protection: 0
A: u
h: t
c: o
t: u
l: o
Date: Mon, 27 Oct 2025 21:21:40 GMT
Connection: keep-alive
Keep-Alive: timeout=5
Transfer-Encoding: chunked
After searching I found https://github.com/tus/tus-js-client/issues/694 (pointing to https://github.com/expressjs/morgan/issues/315) that advises patching on-headers with v1.1.0 but it's not working at all.
Looking at the changelog it seems srvx is the new thing in @tus/server v2.1.0 so I guess it comes from this.
For the moment, just sticking with v2.0.0 as it's working 👍
Thank you,
- 主要言語
- TypeScript
- スター
- 1.1k
- フォーク
- 227
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tus/tus-node-server のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
tus/tus-node-server#884 ·
メンテナーはふだん 1 日以内に返信
-
Datastore dynamicオープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
tus/tus-node-server#737 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
tus/tus-node-server#722 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
tus/tus-node-server#521 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
tus/tus-node-server#380 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
tus/tus-node-server の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
pending close triaging
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode#62582 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
callstack/react-native-paper#5189 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
live-codes/livecodes#1079 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add: ESP 2 ROオープンapproved check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信