summaryrefslogtreecommitdiff
path: root/src/gui/updatewindow.cpp
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2008-12-06 20:02:33 -0700
committerFate <fate-tmw@googlemail.com>2008-12-06 20:02:33 -0700
commit28fa707f1ab22e7cac8abff703d534aec3228d5c (patch)
treebc0d906aa6d414b867eda5df02520b5f707216f1 /src/gui/updatewindow.cpp
parent704f58c9033599c871c176df68ffe7ac3bc8c969 (diff)
parent7b11d719316e84d97e95a32de2a74803aa18e5da (diff)
downloadmana-28fa707f1ab22e7cac8abff703d534aec3228d5c.tar.gz
mana-28fa707f1ab22e7cac8abff703d534aec3228d5c.tar.bz2
mana-28fa707f1ab22e7cac8abff703d534aec3228d5c.tar.xz
mana-28fa707f1ab22e7cac8abff703d534aec3228d5c.zip
Merge branch 'master' into statuseffects
Diffstat (limited to 'src/gui/updatewindow.cpp')
-rw-r--r--src/gui/updatewindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index c0344b72..7f7d45fc 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -310,6 +310,17 @@ int UpdaterWindow::downloadThread(void *ptr)
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);
+ struct curl_slist *pHeaders = NULL;
+ if (uw->mDownloadStatus != UPDATE_RESOURCES)
+ {
+ // Make sure the resources2.txt and news.txt aren't cached,
+ // in order to always get the latest version.
+ pHeaders = curl_slist_append(pHeaders, "pragma: no-cache");
+ pHeaders =
+ curl_slist_append(pHeaders, "Cache-Control: no-cache");
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, pHeaders);
+ }
+
if ((res = curl_easy_perform(curl)) != 0)
{
uw->mDownloadStatus = UPDATE_ERROR;
@@ -334,6 +345,11 @@ int UpdaterWindow::downloadThread(void *ptr)
curl_easy_cleanup(curl);
+ if (uw->mDownloadStatus != UPDATE_RESOURCES)
+ {
+ curl_slist_free_all(pHeaders);
+ }
+
if (!uw->mStoreInMemory)
{
// Don't check resources2.txt checksum