Skip to content
New issue

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

[httprequest] fix unsafe parser #1629

Merged
merged 6 commits into from Dec 27, 2018

Conversation

Projects
None yet
3 participants
@PatriceJiang
Copy link
Contributor

PatriceJiang commented Dec 17, 2018

char statusText[16] = {0};
sscanf(header.c_str(), "HTTP/%d.%d %d %s", &_v1, &_v2, &code, statusText);
_statusText = statusText;
if(_statusText.empty())

This comment has been minimized.

@PatriceJiang

PatriceJiang Dec 18, 2018

Author Contributor

服务器可能返回不完整的协议, 缺少statusText.
可以根据协议标准补齐。

@PatriceJiang

This comment has been minimized.

Copy link
Contributor Author

PatriceJiang commented Dec 18, 2018

@minggo pls review

@PatriceJiang

This comment has been minimized.

Copy link
Contributor Author

PatriceJiang commented Dec 21, 2018

@drelaptop please review if you are available

@minggo

minggo approved these changes Dec 21, 2018

@minggo minggo merged commit cccaddf into cocos-creator:v2.1-release Dec 27, 2018

@liuyl28

This comment has been minimized.

Copy link

liuyl28 commented Feb 15, 2019

2.0.9-beta1 版本上验证,example->network 测试项 ,加载 XMLHttpRequest 不会导致工程奔溃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.