| 417 | } |
| 418 | |
| 419 | bool HttpRequest::conditionalRequest() const |
| 420 | { |
| 421 | if (!ifModSinceHeader_.empty()) { |
| 422 | return true; |
| 423 | } |
| 424 | for (auto& h : headers_) { |
| 425 | if (util::istartsWith(h, "if-modified-since") || |
| 426 | util::istartsWith(h, "if-none-match")) { |
| 427 | return true; |
| 428 | } |
| 429 | } |
| 430 | return false; |
| 431 | } |
| 432 | |
| 433 | } // namespace aria2 |