Merge pull request #12891 from fusijie/refine_HttpAsynConnection

refine NSLog in HttpAsynConnection in release mode.
This commit is contained in:
子龙山人 2015-07-17 15:29:55 +08:00
commit c82cf5ecd4
1 changed files with 5 additions and 0 deletions

View File

@ -61,7 +61,10 @@
- (void) startRequest:(NSURLRequest *)request - (void) startRequest:(NSURLRequest *)request
{ {
#ifdef COCOS2D_DEBUG
NSLog(@"Starting to load %@", srcURL); NSLog(@"Starting to load %@", srcURL);
#endif
finish = false; finish = false;
self.responseData = [NSMutableData data]; self.responseData = [NSMutableData data];
@ -90,7 +93,9 @@
**/ **/
- (void) connection:(NSURLConnection *)connection - (void) connection:(NSURLConnection *)connection
didReceiveResponse:(NSURLResponse *)response { didReceiveResponse:(NSURLResponse *)response {
#ifdef COCOS2D_DEBUG
NSLog(@"Received response from request to url %@", srcURL); NSLog(@"Received response from request to url %@", srcURL);
#endif
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response; NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
//NSLog(@"All headers = %@", [httpResponse allHeaderFields]); //NSLog(@"All headers = %@", [httpResponse allHeaderFields]);