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

bug fix #505

Merged
merged 2 commits into from
Jun 26, 2014
Merged

bug fix #505

merged 2 commits into from
Jun 26, 2014

Conversation

seobyeongky
Copy link
Contributor

Updated to follow the spec (http://www.w3.org/TR/XMLHttpRequest/)

dingpinglv added a commit that referenced this pull request Jun 26, 2014
@dingpinglv dingpinglv merged commit b090632 into cocos2d:master Jun 26, 2014
@seobyeongky seobyeongky deleted the patch-2 branch June 30, 2014 01:10
_errorFlag = true;
_status = 0;
_statusText.clear();
return;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @seobyeongky , if statusCode is 0, why don't we need to notify JS that there is an error triggered?
Here, we just return without any notifications to JS.

@seobyeongky
Copy link
Contributor Author

Yeah, I concerned about that!.... Because the original cocos's XMLHttpRequest notifies network error events. But According to the spec(http://www.w3.org/TR/XMLHttpRequest/), The readyStatus value is one of following values UNSENT(0), OPENED(1), HEADERS_RECEIVED(2), LOADING(3), DONE(4). And there is no error or timeout state. And the event that changes to UNSENT should not be notified. That means no notification. It should be an "onerror" callback, and I didn't added it. Sorry about that! I didn't notice about this issue. I will add it soon!

@dumganhar
Copy link

It should be an "onerror" callback, and I didn't added it. Sorry about that! I didn't notice about this issue. I will add it soon!

Thanks. I need this feature in my project, when will you send another PR for this feature?

@seobyeongky
Copy link
Contributor Author

My plan is finish it until tomorrow.

@dumganhar
Copy link

Great. I will be waiting for this fix. :)

@seobyeongky
Copy link
Contributor Author

#1483

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

Successfully merging this pull request may close these issues.

3 participants