We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The search for the header name is case-insensitive.
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getResponseHeader
当前的实现没有忽略大小写:
adapters/platforms/wechat/wrapper/builtin/XMLHttpRequest.js
Line 77 in ff6ddfb
这意味着如果 server 返回的是 Content-Type: application/json,而代码中使用 xhr.getResponseHeader('content-type') 拿到的会是 undefined。比如我们用的 superagent 就是这么用的: https://github.com/visionmedia/superagent/blob/aa43b3d27594d231afee9009ae740ce1b44a6f62/src/client.js#L351
Content-Type: application/json
xhr.getResponseHeader('content-type')
请考虑在实现 getResponseHeader 时忽略 key 的大小写。感谢支持。
The text was updated successfully, but these errors were encountered:
感谢反馈,我们之后跟标准同步一下
Sorry, something went wrong.
PPpro
No branches or pull requests
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getResponseHeader
当前的实现没有忽略大小写:
adapters/platforms/wechat/wrapper/builtin/XMLHttpRequest.js
Line 77 in ff6ddfb
这意味着如果 server 返回的是
Content-Type: application/json
,而代码中使用xhr.getResponseHeader('content-type')
拿到的会是 undefined。比如我们用的 superagent 就是这么用的: https://github.com/visionmedia/superagent/blob/aa43b3d27594d231afee9009ae740ce1b44a6f62/src/client.js#L351请考虑在实现 getResponseHeader 时忽略 key 的大小写。感谢支持。
The text was updated successfully, but these errors were encountered: