You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(node:1160) [UNDICI-H2] Warning: H2 support is experimental, expect them to change at any time.
(Use node --trace-warnings ... to show where the warning was created)
TypeError: fetch failed
at fetch (/home/runner/H2-headers/node_modules/undici/index.js:109:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/runner/H2-headers/index.js:8:13 {
[cause]: TypeError: Cannot read properties of undefined (reading 'toString')
at Object.onHeaders (/home/runner/H2-headers/node_modules/undici/lib/web/fetch/index.js:2135:97)
at Request.onHeaders (/home/runner/H2-headers/node_modules/undici/lib/core/request.js:243:29)
at ClientHttp2Stream. (/home/runner/H2-headers/node_modules/undici/lib/dispatcher/client-h2.js:420:17)
at Object.onceWrapper (node:events:633:26)
at ClientHttp2Stream.emit (node:events:518:28)
at emit (node:internal/http2/core:331:3)
at process.processTicksAndRejections (node:internal/process/task_queues:85:22)
Environment
Node v20.11.1
undici 6.11.1
Additional context
This bug is present onliy in undici >= 6.11
The text was updated successfully, but these errors were encountered:
Yes, we changed the way we parse the response headers; it seems the root cause goes to the way we parse the setCookie, as with node:http2, multiple set-cookie headers are consolidated into an array of multiple values, we need to change that so fetch can parse it accordingly to the spec.
Bug Description
By making requests to websites that return multiple set-cookie header with HTTP/2 enabled, an exception is triggered while processing the headers
Reproducible By
https://replit.com/@gava97/H2-headers
Expected Behavior
No exception thrown, headers parsed correctly
Logs & Screenshots
(node:1160) [UNDICI-H2] Warning: H2 support is experimental, expect them to change at any time.
(Use
node --trace-warnings ...
to show where the warning was created)TypeError: fetch failed
at fetch (/home/runner/H2-headers/node_modules/undici/index.js:109:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///home/runner/H2-headers/index.js:8:13 {
[cause]: TypeError: Cannot read properties of undefined (reading 'toString')
at Object.onHeaders (/home/runner/H2-headers/node_modules/undici/lib/web/fetch/index.js:2135:97)
at Request.onHeaders (/home/runner/H2-headers/node_modules/undici/lib/core/request.js:243:29)
at ClientHttp2Stream. (/home/runner/H2-headers/node_modules/undici/lib/dispatcher/client-h2.js:420:17)
at Object.onceWrapper (node:events:633:26)
at ClientHttp2Stream.emit (node:events:518:28)
at emit (node:internal/http2/core:331:3)
at process.processTicksAndRejections (node:internal/process/task_queues:85:22)
Environment
Node v20.11.1
undici 6.11.1
Additional context
This bug is present onliy in undici >= 6.11
The text was updated successfully, but these errors were encountered: