-
Notifications
You must be signed in to change notification settings - Fork 213
Closed as not planned
Labels
Description
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
Hello,
integrating TUS server into my Express app but i'm getting this error
Invalid value "undefined" for header "*" when the client does his HEAD request
Using
"@tus/server": "^2.1.0", //Tested with 2.2.0 and 2.1.0
and
"@uppy/core": "^4.4.6",
"@uppy/react": "^4.3.0",
"@uppy/tus": "^4.2.2",
This also happens if using react-uploady and does not happen in version 2.0.0 or version 1.x.
It seems to be related to srvx which was introduced with #749.
Error stack:
node:_http_outgoing:645
validateHeaderValue(name, value);
^
TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "*"
at ServerResponse.setHeader (node:_http_outgoing:645:3)
at setHeadersFromArray (/usr/src/app/node_modules/on-headers/index.js:78:9)
at ServerResponse.setWriteHeadHeaders (/usr/src/app/node_modules/on-headers/index.js:119:5)
at ServerResponse.writeHead (/usr/src/app/node_modules/on-headers/index.js:30:36)
at sendNodeResponse (file:///usr/src/app/node_modules/srvx/dist/adapters/node.mjs:40:13)
at file:///usr/src/app/node_modules/srvx/dist/adapters/node.mjs:898:63 {
code: 'ERR_HTTP_INVALID_HEADER_VALUE'
}
Thank you in advance
Expected behavior
Does not throw on request and recovers upload progress successfully
Actual behavior
NodeJS server crashes if using tusExpress.all('*', tusServer.handle.bind(tusServer))
Manually calling await tusServer.handle(req, res);
gives me the chance to not crash but no upload progress is recoverd ( every download is restarted from 0)