diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-05-17 19:36:54 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-05-17 19:36:54 +0000 |
commit | e338fc9130407ea01fa9c8c2244b6d2a69cd0921 (patch) | |
tree | 27f6a8a62f674f89173f8008084b99fe1f9c3169 /rbutil/rbutilqt/httpget.cpp | |
parent | be28f8441b84765caf334d1f5f0b3fe50b3b6b35 (diff) | |
download | rockbox-e338fc9130407ea01fa9c8c2244b6d2a69cd0921.tar.gz rockbox-e338fc9130407ea01fa9c8c2244b6d2a69cd0921.zip |
Allow http caching to use the old dumb mode again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17560 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/httpget.cpp')
-rw-r--r-- | rbutil/rbutilqt/httpget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/httpget.cpp b/rbutil/rbutilqt/httpget.cpp index fcc2d4163c..a1385c5755 100644 --- a/rbutil/rbutilqt/httpget.cpp +++ b/rbutil/rbutilqt/httpget.cpp | |||
@@ -25,13 +25,14 @@ | |||
25 | 25 | ||
26 | QDir HttpGet::m_globalCache; //< global cach path value for new objects | 26 | QDir HttpGet::m_globalCache; //< global cach path value for new objects |
27 | QUrl HttpGet::m_globalProxy; //< global proxy value for new objects | 27 | QUrl HttpGet::m_globalProxy; //< global proxy value for new objects |
28 | bool HttpGet::m_globalDumbCache = false; //< globally set cache "dumb" mode | ||
28 | 29 | ||
29 | HttpGet::HttpGet(QObject *parent) | 30 | HttpGet::HttpGet(QObject *parent) |
30 | : QObject(parent) | 31 | : QObject(parent) |
31 | { | 32 | { |
32 | outputToBuffer = true; | 33 | outputToBuffer = true; |
33 | m_cached = false; | 34 | m_cached = false; |
34 | m_noHeaderCheck = false; | 35 | m_dumbCache = m_globalDumbCache; |
35 | getRequest = -1; | 36 | getRequest = -1; |
36 | // if a request is cancelled before a reponse is available return some | 37 | // if a request is cancelled before a reponse is available return some |
37 | // hint about this in the http response instead of nonsense. | 38 | // hint about this in the http response instead of nonsense. |
@@ -199,7 +200,7 @@ bool HttpGet::getFile(const QUrl &url) | |||
199 | m_hash = QCryptographicHash::hash(url.toEncoded(), QCryptographicHash::Md5).toHex(); | 200 | m_hash = QCryptographicHash::hash(url.toEncoded(), QCryptographicHash::Md5).toHex(); |
200 | m_path = QString(QUrl::toPercentEncoding(url.path(), "/")); | 201 | m_path = QString(QUrl::toPercentEncoding(url.path(), "/")); |
201 | 202 | ||
202 | if(m_noHeaderCheck || !m_usecache) { | 203 | if(m_dumbCache || !m_usecache) { |
203 | getFileFinish(); | 204 | getFileFinish(); |
204 | } | 205 | } |
205 | else { | 206 | else { |