-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failures on Node v19 (and likely v20 #2020
Comments
This is the failing test https://github.com/nodejs/undici/blob/main/test/issue-1903.js |
Failure logs https://github.com/nodejs/undici/actions/runs/4477206842/jobs/7888223614#step:14:7115
|
Related to nodejs/node#46528 |
With nodejs/node#46528 if there is explicit |
I dont think this was ever supposed to work: Lines 26 to 30 in f0271d4
nodejs/node#46528 this PR solved the behaviour mismatch in encoding when using content length. @ShogunPanda |
Even once the header is encoded it still fails. I noticed that undici always encodes the content-disposition header to latin1, even if there is no content-length header too, but fixing that still doesn't pass the test either |
I'm mostly sure this is a bug in node. The test is triggering this condition and throwing an error: buffer = Buffer.from(`66 69 6c 65 6e 61 6d 65 3d 27 fd 72 2e 70 64 66 27`.split(' ').map(v => parseInt(v, 16))) so the regex is being called with a buffer, stringifying it to utf8 (as is the default encoding) /[^\t\x20-\x7e\x80-\xff]/.exec(buffer) !== null // true
/[^\t\x20-\x7e\x80-\xff]/.exec(buffer.toString()) !== null // true
/[^\t\x20-\x7e\x80-\xff]/.exec(buffer.toString('latin1')) !== null // false, correct case if I'm missing something please feel free to correct me 😄 adding on, it makes sense for the value to be a buffer because of the line here |
Yea I also think this is a Node bug.
Should work and has nothing to do with undici |
@marco-ippolito wdyt? |
I suggest, to get our tests working we disable this test for node 19+ until it's been fixed in Node. @mcollina wdyt? |
I have a PR that disables it & matches the parsing of content-disposition with node |
yes this is a bug, |
We have a few tests failures on Node v19 which we should work to iron out before the v20 release.
The text was updated successfully, but these errors were encountered: