node-modules / urllib

Request HTTP(s) URLs in a complex world.
MIT License
725 stars 115 forks source link

fix: update undiciRequestOption #433

Closed elrrrrrrr closed 1 year ago

elrrrrrrr commented 1 year ago

使用 undici 内部的 undiciRequestOption 类型,同时限制 headers 为 IncomingHttpHeaders

elrrrrrrr commented 1 year ago

CI 用例挂了

和 undici 近期变更有关,先看看他们是否愿意合并 🤩 https://github.com/nodejs/undici/pull/1921

fengmk2 commented 1 year ago

这个修复没有对应的单测?

elrrrrrrr commented 1 year ago

这个修复没有对应的单测?

预期是完全兼容现在的代码 (⊙o⊙)…

https://github.com/node-modules/urllib/blob/master/test/diagnostics_channel.test.ts#L95 另外发现直接传 reset: false 会导致这个用例异常,估计是 undici 内部还有参数判断逻辑,先不加了

fengmk2 commented 1 year ago

tsc 挂了

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 3.10.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: