获取文件的大小
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
if(httpResponse && [httpResponse respondsToSelector:@selector(allHeaderFields)]){
NSDictionary *httpResponseHeaderFields = [httpResponse allHeaderFields];
total_ = [[httpResponseHeaderFields objectForKey:@"Content-Length"] longLongValue];
//NSLog(@"%lld", total_);
}
}