Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

请求内容不转义真的能用 #83

Closed
huhuime opened this issue Aug 16, 2017 · 1 comment
Closed

请求内容不转义真的能用 #83

huhuime opened this issue Aug 16, 2017 · 1 comment

Comments

@huhuime
Copy link

huhuime commented Aug 16, 2017

环境

系统: win7 x64

nodejs 版本:
v6.3.0

出现问题

高概率响应结果出现'content-length': '0'
请求的内容存在问题

重现步骤

正常请求

期待效果

响应结果不出现'content-length': '0'

存在的bug

NeteaseCloudMusicApi/util/util.js 第46行 http_client.write('params=' + cryptoreq.params + '&encSecKey=' + cryptoreq.encSecKey)

缺少对请求内容转义 “=”、“+”这些肯定要转义的

建议

1、使用querystring的stringify
2、替换= + 为转义符,不然代码中存在设计到重发直到组合数据中不再出现+和= 或者浏览器等待超时

@Binaryify
Copy link
Owner

Binaryify commented Aug 17, 2017

改成这样了,应该没问题了吧
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants