Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fetch: fix small spec inconsistency (#1158)
This condition is not *yet* possible to meet so I couldn't add a test (sorry!). The responseTainting is always set here or a network error is returned (.status = 0 is a network error which makes the check never pass): https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L529 and the condition is always met because response is never set https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L475 The spec says that "[a] basic filtered response is a filtered response whose type is "basic" and header list excludes any headers in internal response’s header list whose name is a forbidden response-header name." The library was incorrectly excluding valid headers. If `data:`, `blob:`, `about:`, or `file:` URIs are ever supported, this change will be needed.
- Loading branch information