`@tus/server` `>= v2.1.0` seems now incompatible with Next.js pages API
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- nextjs, node.js, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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,
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.1k
- Forks
- 228
- Merge medio
- 2 d 13 h
- PR fusionados (30 d)
- 16
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tus/tus-node-server
-
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
tus/tus-node-server#884 ·
Los mantenedores suelen responder en 1 día
-
Datastore dynamicAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
tus/tus-node-server#737 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
tus/tus-node-server#722 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
tus/tus-node-server#521 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
tus/tus-node-server#380 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de tus/tus-node-server
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
LucasSantana-Dev/Lucky#2951 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
danielmiessler/LifeOS#2567 ·
Los mantenedores suelen responder en 9 días
-
refactor(react-pi): classify base64 images with core's parseBase64Posiblemente ocupada @jimmyallinai la tomó hoy. Abiertomaintenance
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
assistant-ui/assistant-ui#10293 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
brijeshb42/monaco-vim#175 ·