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

Conversation

@PatriceJiang
Copy link
Contributor

@PatriceJiang 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
Copy link
Contributor Author

@PatriceJiang PatriceJiang commented Dec 18, 2018

@minggo pls review

@PatriceJiang
Copy link
Contributor Author

@PatriceJiang 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
Copy link

@liuyl28 liuyl28 commented Feb 15, 2019

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

@PatriceJiang PatriceJiang deleted the PatriceJiang:fix_xmlhttprequest_status_unsafe_parser branch Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants