CernVM-FS  2.10.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
download.h
Go to the documentation of this file.
1 
5 #ifndef CVMFS_DOWNLOAD_H_
6 #define CVMFS_DOWNLOAD_H_
7 
8 #include <poll.h>
9 #include <pthread.h>
10 #include <stdint.h>
11 #include <unistd.h>
12 
13 #include <cstdio>
14 #include <map>
15 #include <set>
16 #include <string>
17 #include <vector>
18 
19 #include "gtest/gtest_prod.h"
20 
21 #include "compression.h"
22 #include "crypto/hash.h"
23 #include "dns.h"
24 #include "duplex_curl.h"
25 #include "sink.h"
26 #include "ssl.h"
27 #include "statistics.h"
28 #include "util/atomic.h"
29 #include "util/prng.h"
30 
31 class InterruptCue;
32 
33 namespace download {
34 
39 enum Failures {
40  kFailOk = 0,
45  // artificial failure code. Try other host even though
46  // failure seems to be at the proxy
61 
63 }; // Failures
64 
65 
66 inline bool IsHostTransferError(const Failures error) {
67  switch (error) {
69  case kFailHostTooSlow:
71  return true;
72  default:
73  break;
74  }
75  return false;
76 }
77 
78 inline bool IsProxyTransferError(const Failures error) {
79  switch (error) {
81  case kFailProxyTooSlow:
83  return true;
84  default:
85  break;
86  }
87  return false;
88 }
89 
90 inline const char *Code2Ascii(const Failures error) {
91  const char *texts[kFailNumEntries + 1];
92  texts[0] = "OK";
93  texts[1] = "local I/O failure";
94  texts[2] = "malformed URL";
95  texts[3] = "failed to resolve proxy address";
96  texts[4] = "failed to resolve host address";
97  texts[5] = "all proxies failed, trying host fail-over";
98  texts[6] = "proxy connection problem";
99  texts[7] = "host connection problem";
100  texts[8] = "proxy returned HTTP error";
101  texts[9] = "host returned HTTP error";
102  texts[10] = "corrupted data received";
103  texts[11] = "resource too big to download";
104  texts[12] = "unknown network error";
105  texts[13] = "Unsupported URL in protocol";
106  texts[14] = "proxy serving data too slowly";
107  texts[15] = "host serving data too slowly";
108  texts[16] = "proxy data transfer cut short";
109  texts[17] = "host data transfer cut short";
110  texts[18] = "request canceled";
111  texts[19] = "no text";
112  return texts[error];
113 }
114 
124 }; // Destination
125 
126 
127 struct Counters {
129  perf::Counter *sz_transfer_time; // measured in miliseconds
134 
135  explicit Counters(perf::StatisticsTemplate statistics) {
136  sz_transferred_bytes = statistics.RegisterTemplated("sz_transferred_bytes",
137  "Number of transferred bytes");
138  sz_transfer_time = statistics.RegisterTemplated("sz_transfer_time",
139  "Transfer time (miliseconds)");
140  n_requests = statistics.RegisterTemplated("n_requests",
141  "Number of requests");
142  n_retries = statistics.RegisterTemplated("n_retries", "Number of retries");
143  n_proxy_failover = statistics.RegisterTemplated("n_proxy_failover",
144  "Number of proxy failovers");
145  n_host_failover = statistics.RegisterTemplated("n_host_failover",
146  "Number of host failovers");
147  }
148 }; // Counters
149 
150 
154 struct JobInfo {
155  const std::string *url;
161  pid_t pid;
162  uid_t uid;
163  gid_t gid;
164  void *cred_data; // Per-transfer credential data
167  struct {
168  size_t size;
169  size_t pos;
170  char *data;
171  } destination_mem;
173  const std::string *destination_path;
176  const std::string *extra_info;
177 
178  // Allow byte ranges to be specified.
180  off_t range_size;
181 
182  // Default initialization of fields
183  void Init() {
184  url = NULL;
185  compressed = false;
186  probe_hosts = false;
187  head_request = false;
188  follow_redirects = false;
189  force_nocache = false;
190  pid = -1;
191  uid = -1;
192  gid = -1;
193  cred_data = NULL;
194  interrupt_cue = NULL;
196  destination_mem.size = destination_mem.pos = 0;
197  destination_mem.data = NULL;
198  destination_file = NULL;
199  destination_path = NULL;
200  destination_sink = NULL;
201  expected_hash = NULL;
202  extra_info = NULL;
203 
204  curl_handle = NULL;
205  headers = NULL;
206  memset(&zstream, 0, sizeof(zstream));
207  info_header = NULL;
208  wait_at[0] = wait_at[1] = -1;
209  nocache = false;
212  backoff_ms = 0;
214 
215  range_offset = -1;
216  range_size = -1;
217  http_code = -1;
218  }
219 
220  // One constructor per destination + head request
221  JobInfo() { Init(); }
222  JobInfo(const std::string *u, const bool c, const bool ph,
223  const std::string *p, const shash::Any *h)
224  {
225  Init();
226  url = u;
227  compressed = c;
228  probe_hosts = ph;
230  destination_path = p;
231  expected_hash = h;
232  }
233  JobInfo(const std::string *u, const bool c, const bool ph, FILE *f,
234  const shash::Any *h)
235  {
236  Init();
237  url = u;
238  compressed = c;
239  probe_hosts = ph;
241  destination_file = f;
242  expected_hash = h;
243  }
244  JobInfo(const std::string *u, const bool c, const bool ph,
245  const shash::Any *h)
246  {
247  Init();
248  url = u;
249  compressed = c;
250  probe_hosts = ph;
252  expected_hash = h;
253  }
254  JobInfo(const std::string *u, const bool c, const bool ph,
255  cvmfs::Sink *s, const shash::Any *h)
256  {
257  Init();
258  url = u;
259  compressed = c;
260  probe_hosts = ph;
262  destination_sink = s;
263  expected_hash = h;
264  }
265  JobInfo(const std::string *u, const bool ph) {
266  Init();
267  url = u;
268  probe_hosts = ph;
269  head_request = true;
270  }
271 
273  if (wait_at[0] >= 0) {
274  close(wait_at[0]);
275  close(wait_at[1]);
276  }
277  }
278 
283  bool IsFileNotFound();
284 
285  // Internal state, don't touch
286  CURL *curl_handle;
287  curl_slist *headers;
288  char *info_header;
289  z_stream zstream;
291  int wait_at[2];
292  std::string proxy;
293  bool nocache;
296  unsigned char num_used_proxies;
297  unsigned char num_used_hosts;
298  unsigned char num_retries;
299  unsigned backoff_ms;
301 }; // JobInfo
302 
303 
313 class HeaderLists {
314  FRIEND_TEST(T_HeaderLists, Intrinsics);
315  public:
316  ~HeaderLists();
317  curl_slist *GetList(const char *header);
318  curl_slist *DuplicateList(curl_slist *slist);
319  void AppendHeader(curl_slist *slist, const char *header);
320  void CutHeader(const char *header, curl_slist **slist);
321  void PutList(curl_slist *slist);
322  std::string Print(curl_slist *slist);
323 
324  private:
325  static const unsigned kBlockSize = 4096/sizeof(curl_slist);
326 
327  bool IsUsed(curl_slist *slist) { return slist->data != NULL; }
328  curl_slist *Get(const char *header);
329  void Put(curl_slist *slist);
330  void AddBlock();
331 
332  std::vector<curl_slist *> blocks_; // List of curl_slist blocks
333 };
334 
335 
342  public:
344  virtual bool ConfigureCurlHandle(CURL *curl_handle,
345  pid_t pid,
346  void **info_data) = 0;
347  virtual void ReleaseCurlHandle(CURL *curl_handle, void *info_data) = 0;
348 };
349 
350 
355 class DownloadManager { // NOLINT(clang-analyzer-optin.performance.Padding)
356  FRIEND_TEST(T_Download, ValidateGeoReply);
357  FRIEND_TEST(T_Download, StripDirect);
358 
359  public:
360  struct ProxyInfo {
361  ProxyInfo() { }
362  explicit ProxyInfo(const std::string &url) : url(url) { }
363  ProxyInfo(const dns::Host &host, const std::string &url)
364  : host(host)
365  , url(url)
366  { }
367  std::string Print();
369  std::string url;
370  };
371 
376  };
377 
381  static const int kProbeUnprobed;
386  static const int kProbeDown;
390  static const int kProbeGeo;
391 
395  static const unsigned kMaxMemSize;
396 
397  static const unsigned kDnsDefaultRetries = 1;
398  static const unsigned kDnsDefaultTimeoutMs = 3000;
399  static const unsigned kProxyMapScale = 16;
400 
401  DownloadManager();
403 
404  static int ParseHttpCode(const char digits[3]);
405 
406  void Init(const unsigned max_pool_handles,
407  const perf::StatisticsTemplate &statistics);
408  void Fini();
409  void Spawn();
410  DownloadManager *Clone(const perf::StatisticsTemplate &statistics);
411  Failures Fetch(JobInfo *info);
412 
414  std::string GetDnsServer() const;
415  void SetDnsServer(const std::string &address);
416  void SetDnsParameters(const unsigned retries, const unsigned timeout_ms);
417  void SetDnsTtlLimits(const unsigned min_seconds, const unsigned max_seconds);
418  void SetIpPreference(const dns::IpPreference preference);
419  void SetTimeout(const unsigned seconds_proxy, const unsigned seconds_direct);
420  void GetTimeout(unsigned *seconds_proxy, unsigned *seconds_direct);
421  void SetLowSpeedLimit(const unsigned low_speed_limit);
422  void SetHostChain(const std::string &host_list);
423  void SetHostChain(const std::vector<std::string> &host_list);
424  void GetHostInfo(std::vector<std::string> *host_chain,
425  std::vector<int> *rtt, unsigned *current_host);
426  void ProbeHosts();
427  bool ProbeGeo();
428  // Sort list of servers using the Geo API. If the output_order
429  // vector is NULL, then the servers vector input is itself sorted.
430  // If it is non-NULL, then servers is left unchanged and the zero-based
431  // ordering is stored into output_order.
432  bool GeoSortServers(std::vector<std::string> *servers,
433  std::vector<uint64_t> *output_order = NULL);
434  void SwitchHost();
435  void SetProxyChain(const std::string &proxy_list,
436  const std::string &fallback_proxy_list,
437  const ProxySetModes set_mode);
438  void GetProxyInfo(std::vector< std::vector<ProxyInfo> > *proxy_chain,
439  unsigned *current_group,
440  unsigned *fallback_group);
441  std::string GetProxyList();
442  std::string GetFallbackProxyList();
443  void ShardProxies();
444  void RebalanceProxies();
445  void SwitchProxyGroup();
446  void SetProxyGroupResetDelay(const unsigned seconds);
447  void SetHostResetDelay(const unsigned seconds);
448  void SetRetryParameters(const unsigned max_retries,
449  const unsigned backoff_init_ms,
450  const unsigned backoff_max_ms);
451  void SetMaxIpaddrPerProxy(unsigned limit);
452  void SetProxyTemplates(const std::string &direct, const std::string &forced);
453  void EnableInfoHeader();
454  void EnableRedirects();
456 
457  unsigned num_hosts() {
458  if (opt_host_chain_) return opt_host_chain_->size();
459  return 0;
460  }
461 
463  return opt_ip_preference_;
464  }
465 
466  private:
467  static int CallbackCurlSocket(CURL *easy, curl_socket_t s, int action,
468  void *userp, void *socketp);
469  static void *MainDownload(void *data);
470 
471  bool StripDirect(const std::string &proxy_list, std::string *cleaned_list);
472  bool ValidateGeoReply(const std::string &reply_order,
473  const unsigned expected_size,
474  std::vector<uint64_t> *reply_vals);
475  void SwitchHost(JobInfo *info);
476  void SwitchProxy(JobInfo *info);
477  ProxyInfo *ChooseProxyUnlocked(const shash::Any *hash);
478  void UpdateProxiesUnlocked(const std::string &reason);
479  void RebalanceProxiesUnlocked(const std::string &reason);
480  CURL *AcquireCurlHandle();
481  void ReleaseCurlHandle(CURL *handle);
482  void ReleaseCredential(JobInfo *info);
483  void InitializeRequest(JobInfo *info, CURL *handle);
484  void SetUrlOptions(JobInfo *info);
485  bool ValidateProxyIpsUnlocked(const std::string &url, const dns::Host &host);
486  void UpdateStatistics(CURL *handle);
487  bool CanRetry(const JobInfo *info);
488  void Backoff(JobInfo *info);
489  void SetNocache(JobInfo *info);
490  void SetRegularCache(JobInfo *info);
491  bool VerifyAndFinalize(const int curl_error, JobInfo *info);
492  void InitHeaders();
493  void FiniHeaders();
494  void CloneProxyConfig(DownloadManager *clone);
495 
496  inline std::vector<ProxyInfo> *current_proxy_group() const {
497  return (opt_proxy_groups_ ?
499  }
500 
502  std::set<CURL *> *pool_handles_idle_;
503  std::set<CURL *> *pool_handles_inuse_;
505  CURLM *curl_multi_;
507  curl_slist *default_headers_;
508  char *user_agent_;
509 
510  pthread_t thread_download_;
513 
514  int pipe_jobs_[2];
515  struct pollfd *watch_fds_;
516  uint32_t watch_fds_size_;
518  uint32_t watch_fds_max_;
519 
520  pthread_mutex_t *lock_options_;
521  pthread_mutex_t *lock_synchronous_mode_;
522  std::string opt_dns_server_;
532 
533  // Host list
534  std::vector<std::string> *opt_host_chain_;
539  std::vector<int> *opt_host_chain_rtt_;
541 
542  // Proxy list
543  std::vector< std::vector<ProxyInfo> > *opt_proxy_groups_;
565  std::string opt_proxy_list_;
573  std::map<uint32_t, ProxyInfo *> opt_proxy_map_;
577  std::vector<std::string> opt_proxy_urls_;
582 
587 
592 
605 
613  time_t opt_timestamp_failover_proxies_; // failover within the same group
615 
623 
625 
631 
636 }; // DownloadManager
637 
638 } // namespace download
639 
640 #endif // CVMFS_DOWNLOAD_H_
unsigned opt_timeout_direct_
Definition: download.h:524
bool StripDirect(const std::string &proxy_list, std::string *cleaned_list)
Definition: download.cc:2373
unsigned opt_low_speed_limit_
Definition: download.h:525
Destination destination
Definition: download.h:166
Definition: prng.h:28
static const unsigned kDnsDefaultTimeoutMs
Definition: download.h:398
unsigned opt_backoff_init_ms_
Definition: download.h:527
unsigned char num_used_hosts
Definition: download.h:297
curl_slist * Get(const char *header)
Definition: download.cc:733
std::string Print(curl_slist *slist)
Definition: download.cc:723
unsigned opt_proxy_groups_current_burned_
Definition: download.h:552
unsigned opt_proxy_groups_reset_after_
Definition: download.h:614
void SetUrlOptions(JobInfo *info)
Definition: download.cc:905
void ReleaseCredential(JobInfo *info)
Definition: download.cc:1212
unsigned backoff_ms
Definition: download.h:299
bool IsUsed(curl_slist *slist)
Definition: download.h:327
std::string opt_proxy_fallback_list_
Definition: download.h:569
void SetHostChain(const std::string &host_list)
void SetNocache(JobInfo *info)
Definition: download.cc:1185
unsigned opt_host_reset_after_
Definition: download.h:622
void SetLowSpeedLimit(const unsigned low_speed_limit)
Definition: download.cc:1893
std::string proxy_template_direct_
Definition: download.h:598
static int ParseHttpCode(const char digits[3])
Definition: download.cc:405
FRIEND_TEST(T_Download, ValidateGeoReply)
static const int kProbeGeo
Definition: download.h:390
static const unsigned kBlockSize
Definition: download.h:325
unsigned opt_proxy_groups_current_
Definition: download.h:547
off_t range_offset
Definition: download.h:179
shash::ContextPtr hash_context
Definition: download.h:290
bool ValidateGeoReply(const std::string &reply_order, const unsigned expected_size, std::vector< uint64_t > *reply_vals)
Definition: download.cc:2333
std::vector< ProxyInfo > * current_proxy_group() const
Definition: download.h:496
bool IsFileNotFound()
Definition: download.cc:385
time_t opt_timestamp_backup_proxies_
Definition: download.h:612
void SetProxyChain(const std::string &proxy_list, const std::string &fallback_proxy_list, const ProxySetModes set_mode)
Definition: download.cc:2413
std::string GetProxyList()
Definition: download.cc:2587
unsigned int current_host_chain_index
Definition: download.h:300
std::set< CURL * > * pool_handles_inuse_
Definition: download.h:503
void * cred_data
Definition: download.h:164
pthread_mutex_t * lock_options_
Definition: download.h:520
ProxyInfo * ChooseProxyUnlocked(const shash::Any *hash)
Definition: download.cc:2599
pthread_t thread_download_
Definition: download.h:510
ProxyInfo(const dns::Host &host, const std::string &url)
Definition: download.h:363
std::string opt_proxy_list_
Definition: download.h:565
perf::Counter * sz_transfer_time
Definition: download.h:129
std::vector< std::vector< ProxyInfo > > * opt_proxy_groups_
Definition: download.h:543
unsigned opt_proxy_groups_fallback_
Definition: download.h:557
curl_slist * default_headers_
Definition: download.h:507
curl_slist * GetList(const char *header)
Definition: download.cc:657
void ReleaseCurlHandle(CURL *handle)
Definition: download.cc:819
z_stream zstream
Definition: download.h:289
void SetDnsServer(const std::string &address)
Definition: download.cc:1822
JobInfo(const std::string *u, const bool c, const bool ph, const shash::Any *h)
Definition: download.h:244
FRIEND_TEST(T_HeaderLists, Intrinsics)
static void * MainDownload(void *data)
Definition: download.cc:498
void SetTimeout(const unsigned seconds_proxy, const unsigned seconds_direct)
Definition: download.cc:1879
perf::Counter * n_retries
Definition: download.h:131
std::string opt_dns_server_
Definition: download.h:522
void Backoff(JobInfo *info)
Definition: download.cc:1163
perf::Counter * sz_transferred_bytes
Definition: download.h:128
int32_t atomic_int32
Definition: atomic.h:17
Counter * RegisterTemplated(const std::string &name_minor, const std::string &desc)
Definition: statistics.h:109
void UpdateStatistics(CURL *handle)
Definition: download.cc:1129
void SetDnsTtlLimits(const unsigned min_seconds, const unsigned max_seconds)
Definition: download.cc:1858
void Init(const unsigned max_pool_handles, const perf::StatisticsTemplate &statistics)
Definition: download.cc:1606
std::vector< std::string > opt_proxy_urls_
Definition: download.h:577
const char * Code2Ascii(const Failures error)
Definition: download.h:90
unsigned char num_retries
Definition: download.h:298
void GetProxyInfo(std::vector< std::vector< ProxyInfo > > *proxy_chain, unsigned *current_group, unsigned *fallback_group)
Definition: download.cc:2562
void SetProxyGroupResetDelay(const unsigned seconds)
Definition: download.cc:2710
atomic_int32 multi_threaded_
Definition: download.h:511
dns::NormalResolver * resolver_
Definition: download.h:586
std::vector< curl_slist * > blocks_
Definition: download.h:332
ProxyInfo(const std::string &url)
Definition: download.h:362
dns::IpPreference opt_ip_preference_
Definition: download.h:591
Definition: dns.h:90
perf::Counter * n_host_failover
Definition: download.h:133
void UpdateProxiesUnlocked(const std::string &reason)
Definition: download.cc:2613
bool IsProxyTransferError(const Failures error)
Definition: download.h:78
FILE * destination_file
Definition: download.h:172
void AppendHeader(curl_slist *slist, const char *header)
Definition: download.cc:679
bool follow_redirects
Definition: download.h:159
void SetIpPreference(const dns::IpPreference preference)
Definition: download.cc:1868
perf::Counter * n_requests
Definition: download.h:130
JobInfo(const std::string *u, const bool c, const bool ph, const std::string *p, const shash::Any *h)
Definition: download.h:222
void SetRetryParameters(const unsigned max_retries, const unsigned backoff_init_ms, const unsigned backoff_max_ms)
Definition: download.cc:2729
void SetRegularCache(JobInfo *info)
Definition: download.cc:1199
void CloneProxyConfig(DownloadManager *clone)
Definition: download.cc:2810
void PutList(curl_slist *slist)
Definition: download.cc:714
void SetMaxIpaddrPerProxy(unsigned limit)
Definition: download.cc:2740
DownloadManager * Clone(const perf::StatisticsTemplate &statistics)
Definition: download.cc:2773
const shash::Any * expected_hash
Definition: download.h:175
const std::string * extra_info
Definition: download.h:176
std::vector< int > * opt_host_chain_rtt_
Definition: download.h:539
dns::IpPreference opt_ip_preference() const
Definition: download.h:462
cvmfs::Sink * destination_sink
Definition: download.h:174
SslCertificateStore ssl_certificate_store_
Definition: download.h:635
time_t opt_timestamp_backup_host_
Definition: download.h:621
std::string GetFallbackProxyList()
Definition: download.cc:2591
void SetProxyTemplates(const std::string &direct, const std::string &forced)
Definition: download.cc:2746
IpPreference
Definition: dns.h:46
unsigned opt_backoff_max_ms_
Definition: download.h:528
std::string GetDnsServer() const
Definition: download.cc:1814
unsigned opt_host_chain_current_
Definition: download.h:540
CURL * curl_handle
Definition: download.h:286
CredentialsAttachment * credentials_attachment_
Definition: download.h:624
std::vector< std::string > * opt_host_chain_
Definition: download.h:534
struct pollfd * watch_fds_
Definition: download.h:515
std::map< uint32_t, ProxyInfo * > opt_proxy_map_
Definition: download.h:573
curl_slist * DuplicateList(curl_slist *slist)
Definition: download.cc:662
Failures error_code
Definition: download.h:294
JobInfo(const std::string *u, const bool ph)
Definition: download.h:265
Failures Fetch(JobInfo *info)
Definition: download.cc:1722
InterruptCue * interrupt_cue
Definition: download.h:165
struct download::JobInfo::@3 destination_mem
bool CanRetry(const JobInfo *info)
Definition: download.cc:1147
perf::Counter * n_proxy_failover
Definition: download.h:132
JobInfo(const std::string *u, const bool c, const bool ph, FILE *f, const shash::Any *h)
Definition: download.h:233
void GetTimeout(unsigned *seconds_proxy, unsigned *seconds_direct)
Definition: download.cc:1902
std::string proxy_template_forced_
Definition: download.h:604
const std::string * destination_path
Definition: download.h:173
time_t opt_timestamp_failover_proxies_
Definition: download.h:613
void SetDnsParameters(const unsigned retries, const unsigned timeout_ms)
Definition: download.cc:1840
static const int kProbeUnprobed
Definition: download.h:381
virtual void ReleaseCurlHandle(CURL *curl_handle, void *info_data)=0
static const unsigned kMaxMemSize
Definition: download.h:395
bool IsHostTransferError(const Failures error)
Definition: download.h:66
JobInfo(const std::string *u, const bool c, const bool ph, cvmfs::Sink *s, const shash::Any *h)
Definition: download.h:254
static const unsigned kDnsDefaultRetries
Definition: download.h:397
bool GeoSortServers(std::vector< std::string > *servers, std::vector< uint64_t > *output_order=NULL)
Definition: download.cc:2132
static const int kProbeDown
Definition: download.h:386
curl_slist * headers
Definition: download.h:287
unsigned char num_used_proxies
Definition: download.h:296
Counters(perf::StatisticsTemplate statistics)
Definition: download.h:135
std::string proxy
Definition: download.h:292
static const unsigned kProxyMapScale
Definition: download.h:399
void GetHostInfo(std::vector< std::string > *host_chain, std::vector< int > *rtt, unsigned *current_host)
Definition: download.cc:1946
bool ValidateProxyIpsUnlocked(const std::string &url, const dns::Host &host)
Definition: download.cc:1065
bool VerifyAndFinalize(const int curl_error, JobInfo *info)
Definition: download.cc:1228
void CutHeader(const char *header, curl_slist **slist)
Definition: download.cc:695
const std::string * url
Definition: download.h:155
void SwitchProxy(JobInfo *info)
Definition: download.cc:1966
void SetCredentialsAttachment(CredentialsAttachment *ca)
Definition: download.cc:1806
std::set< CURL * > * pool_handles_idle_
Definition: download.h:502
void RebalanceProxiesUnlocked(const std::string &reason)
Definition: download.cc:2677
pthread_mutex_t * lock_synchronous_mode_
Definition: download.h:521
virtual bool ConfigureCurlHandle(CURL *curl_handle, pid_t pid, void **info_data)=0
void InitializeRequest(JobInfo *info, CURL *handle)
Definition: download.cc:837
static int CallbackCurlSocket(CURL *easy, curl_socket_t s, int action, void *userp, void *socketp)
Definition: download.cc:421
HeaderLists * header_lists_
Definition: download.h:506
void SetHostResetDelay(const unsigned seconds)
Definition: download.cc:2720
void Put(curl_slist *slist)
Definition: download.cc:750
char * info_header
Definition: download.h:288