- if (_config->FindB("Acquire::http::No-Cache",false) == true)
- {
- strcat(Buf,"Cache-Control: no-cache\r\nPragma: no-cache\r\n");
- }
- else
- {
- if (Itm->IndexFile == true)
- {
- sprintf(Buf+strlen(Buf),"Cache-Control: max-age=%u\r\n",
- _config->FindI("Acquire::http::Max-Age",0));
- }
- else
- {
- if (_config->FindB("Acquire::http::No-Store",false) == true)
- strcat(Buf,"Cache-Control: no-store\r\n");
- }
- }
+ if (_config->FindB("Acquire::http::No-Cache",false) == true)
+ Req << "Cache-Control: no-cache\r\n"
+ << "Pragma: no-cache\r\n";
+ else if (Itm->IndexFile == true)
+ Req << "Cache-Control: max-age=" << _config->FindI("Acquire::http::Max-Age",0) << "\r\n";
+ else if (_config->FindB("Acquire::http::No-Store",false) == true)
+ Req << "Cache-Control: no-store\r\n";