alibaba / rax

🐰 Rax is a progressive framework for building universal application. https://rax.js.org
Other
8k stars 627 forks source link

[BUG]调用 request 时,如果传入了小写的 'content-type' 不会覆盖request内默认的 ’Content-Type‘ ,而是会合并到一起 #2274

Closed kucinl closed 2 years ago

kucinl commented 2 years ago

https://github.com/raxjs/universal-api/blob/8d6ff6c80efdff2988fdadbbad8244b772287831/src/packages/network/request/src/common.ts#L73 如果传入的是 { Accept: 'xx', 'content-type': 'xxx' }这样的header,normalizeHeaders 函数会Accept匹配后提前返回false 导致遍历中断