diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-10 07:33:20 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-01-10 07:33:20 +0000 |
| commit | 658442b76205d73e3df224891890a4867239a7eb (patch) | |
| tree | 935ae69090840abfa9f6d391c01422c22bdfd3bf /src/HttpRequestCommand.cc | |
| parent | 84389aefe2a62b95d23165e1aacfb52b32a6075d (diff) | |
2010-01-10 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --http-no-cache option. When true is given, aria2 sends
Cache-Control: no-cache and Pragma: no-cache header to avoid
cached content. If false is given , these headers are not sent
and you can add Cache-Control header with a directive you like
using --header option.
* src/HttpRequest.cc
* src/HttpRequest.h
* src/HttpRequestCommand.cc
* src/OptionHandlerFactory.cc
* src/download_helper.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
Diffstat (limited to 'src/HttpRequestCommand.cc')
| -rw-r--r-- | src/HttpRequestCommand.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc index 5183c642..c6148e39 100644 --- a/src/HttpRequestCommand.cc +++ b/src/HttpRequestCommand.cc @@ -96,7 +96,11 @@ createHttpRequest(const SharedHandle<Request>& req, httpRequest->setProxyRequest(proxyRequest); httpRequest->addAcceptType(rg->getAcceptTypes().begin(), rg->getAcceptTypes().end()); - + if(option->getAsBool(PREF_HTTP_NO_CACHE)) { + httpRequest->enableNoCache(); + } else { + httpRequest->disableNoCache(); + } return httpRequest; } |
