Commit Graph

186 Commits

Author SHA1 Message Date
子龙山人 40ea6e3e41 Merge pull request #12103 from samuele3hu/v3_http_leak
Fix the memory leak of HttpClient on the iOS/Mac platform.
2015-06-02 10:11:03 +08:00
samuele3hu ae6cb678c6 Fix the memory leak of HttpClient on the iOS/Mac platform. 2015-05-29 17:13:49 +08:00
Dale Stammen 60f672599b added winrt networking files 2015-05-28 13:48:13 -07:00
samuele3hu 27e7101322 fix the memory leak of s_requestSentinel for httpclient and adjust the global static var into the object to avoid some unexpected result. 2015-05-22 10:47:52 +08:00
WenhaiLin 461241839d Fixed compile error on visual studio 2015. 2015-05-12 17:04:56 +08:00
Dale Stammen 351a898a70 removed CC_PLATFORM_WP8 2015-05-08 09:19:13 -07:00
HueyPark 25a9c90b54 Fix android http client memory leak 2015-04-26 20:52:09 +09:00
Wenhai Lin ff3777dfd1 [ci skip]Update comments. 2015-03-27 18:26:14 +08:00
samuele3hu f54512a618 Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_5_comment 2015-03-27 15:59:05 +08:00
samuele3hu bb225d052e Update comments of some header files 2015-03-27 15:27:08 +08:00
Wenhai Lin a47cad0354 [ci skip]Fixed warnings 2015-03-27 11:59:10 +08:00
samuele3hu a1b054911c Update comments of some header files 2015-03-27 11:13:28 +08:00
samuele3hu e0bde0f789 Update comments of some header files 2015-03-26 22:07:44 +08:00
WenhaiLin 9dd778edb0 [ci skip]Update comments 2015-03-24 20:23:51 +08:00
minggo 8e32933dd3 Merge pull request #10340 from seobyeongky/network_bugfix2
receive content data even though status code is not 2xx
2015-03-19 21:12:51 +08:00
samuele3hu 1eb1057875 Update comments of some header files 2015-03-19 16:59:21 +08:00
samuele3hu 31b34ddf77 Update comments of some header files 2015-03-19 16:45:53 +08:00
byeonggee.seo a2274162b5 merged 2015-03-12 10:06:53 +09:00
Mazyad Alabduljaleel 983ffd96c7 Now, mac uses ObjC HTTP client 2015-03-10 14:48:57 +04:00
byeonggee.seo b3335f34ae Merge branch 'network_bugfix2' of github.com:seobyeongky/cocos2d-x into network_bugfix2 2015-03-03 16:33:48 +09:00
byeonggee.seo 3811c9f1a3 connError added 2015-03-03 16:33:35 +09:00
seobyeongky 91b0104fd0 Fix an issue with iOS HTTP Request code (https://github.com/cocos2d/cocos2d-x/pull/10543) 2015-02-27 21:31:33 +09:00
minggo 7805adce94 Merge pull request #10325 from seobyeongky/httpclient_bugfix
HttpResponse reference counting bug fixed
2015-02-27 14:32:41 +08:00
minggo e69e648d7c Merge pull request #10483 from redism/ios-network-header-fix
apply custom request header for every request type (ios)
2015-02-26 16:40:12 +08:00
minggo e37bbee1c2 Merge pull request #10545 from Mazyod/ios-http-request-leaks
Fix major memory leaks in iOS http request
2015-02-26 15:41:10 +08:00
minggo 31e8d0dccd Merge pull request #10521 from ryule/fix_httpclient-ios
Fixed HttpClient-ios request to work when the data is started by 0x00.
2015-02-26 10:32:20 +08:00
Mazyad Alabduljaleel 23093b9c53 Just a few more leak fixes 2015-02-25 10:56:25 +04:00
Mazyad Alabduljaleel c80312bea6 Two more memory leaks 2015-02-25 10:52:15 +04:00
Mazyad Alabduljaleel 3e60e0ddf6 For some reason, this is causing a conflict 2015-02-25 10:44:00 +04:00
mogemimi d384f7ce1e Fix typo: unkown -> unknown 2015-02-24 02:39:50 +09:00
Mazyad Alabduljaleel 839f1a851d One more memory leak fix:
When you get the allHeaderFields, the net retain count is 0, because it is autoreleased.
Then, a copy message is issued +1
After that the property itself retains it +1
Total = 2, released once in the dealloc -> leak.
2015-02-23 11:52:49 +04:00
Mazyad Alabduljaleel a2f9956d00 Fix major memory leaks in iOS http request
... and other small fixes

Brief:

1. In iOS, whenever you have a new spawned thread with its own run loop (i.e. while true), you must wrap it with an autorelease pool, so it cleans up the objects at the end of each loop cycle.
2. There were a few "alloc" and "new" objects that weren't released.
3. The HttpAsync class itself was missing dealloc, also property assignment should use `self.property` so the previous value gets released as appropriate.
4. Resolved a small warning

**NOTE**: I have a cocos2d-x game that heavily relies on the HTTP requests, with cookies, but without SSL, so I couldn't test the SSL.
I haven't tested the cookies and SSL yet, but for starters, these improvements are meant to fix the memory issues only, not the logic.
2015-02-23 10:38:33 +04:00
Jongryul Kook c05dd4357d Fixed HttpClient-ios request to work when the data is started by 0x00. 2015-02-18 16:51:12 +09:00
Jeff Oh e33854f3eb apply custom request header for every request type (ios) 2015-02-12 20:07:19 +09:00
byeonggee.seo 753335726a receive content data even though status code is not 2xx 2015-02-03 16:28:23 +09:00
byeonggee.seo 23e0320cac HttpResponse reference counting bug fixed 2015-02-02 12:23:15 +09:00
samuele3hu fec0d9c41d Set default value for `Content-Type` of headfield in `PUT` method 2015-01-31 22:15:15 +08:00
samuele3hu 75dc45bfea Remove useless blank line 2015-01-31 15:21:03 +08:00
samuele3hu e6d50d7086 Fix the error that the binary data would be truncated 2015-01-31 14:31:24 +08:00
samuele3hu 93665c5c6d Fix the error that HttpClient didn’t setResponseCode when connecting failed 2015-01-28 13:49:19 +08:00
cpascal 281d231a5d Fixed inconsistent time-scale in Httpclient. 2015-01-19 10:50:42 +09:00
andyque fcfcb4fd71 fix websocket dead lock 2015-01-16 18:43:57 +08:00
huangshiwu 12212dc572 fix HttpAsynConnection method didReciveResponse's process error 2015-01-14 14:01:58 +08:00
huangshiwu 108e4d2b41 Add comments and improve code readability for HttpAsynConnection.m 2015-01-08 10:12:45 +08:00
huangshiwu be02233815 Fix XmlHttpRequestTest parsing error of response header on iOS platform 2015-01-08 00:23:27 +08:00
samuele3hu c91bd076cb Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_4_bug_xmlhttp 2015-01-04 17:10:22 +08:00
samuele3hu 832a87f5f0 Fix crash on the XmlHttpRequestTest for Lua and parsing error of response headers for HttpURLConnection 2015-01-04 17:09:35 +08:00
minggo 4224319d61 Merge pull request #9775 from huangshiwu/iosnetwork-fixbug
fix iOS HttpClient immediately mode's bug
2015-01-04 14:45:18 +08:00
samuele3hu 713de37c5b Fix compile iOS compile error on the Xcode 5.1.1 2015-01-04 13:49:41 +08:00
huangshiwu 79e3e8463d fix iOS HttpClient immediately mode's bug 2015-01-04 10:54:29 +08:00