summaryrefslogtreecommitdiff
path: root/src/gui/updatewindow.cpp
diff options
context:
space:
mode:
authorKraant <kraant@gmail.com>2008-08-10 13:00:33 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-07 00:52:53 +0100
commitcabf8905526b6601813573d049f6afaf364e1cac (patch)
tree9f81c69a0ec6c078b324883614e2acbb8b2c3760 /src/gui/updatewindow.cpp
parent047f598be826dd57dd1124db914e8367256112be (diff)
downloadmana-cabf8905526b6601813573d049f6afaf364e1cac.tar.gz
mana-cabf8905526b6601813573d049f6afaf364e1cac.tar.bz2
mana-cabf8905526b6601813573d049f6afaf364e1cac.tar.xz
mana-cabf8905526b6601813573d049f6afaf364e1cac.zip
Changed proxy fix to only tell the proxy to no-cache
for news.txt and resources2.txt. (cherry picked from Aethyra commit 3206b3254a1a9b90bbdbd1a7178e4df043a5ee26)
Diffstat (limited to 'src/gui/updatewindow.cpp')
-rw-r--r--src/gui/updatewindow.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp
index d453e22a..2edb1a9a 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -310,12 +310,15 @@ int UpdaterWindow::downloadThread(void *ptr)
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, 15);
- /*caching breaks things when resources2.txt is cached
- *so caching is turned off on the proxy with this header
- *change*/
struct curl_slist *pHeaders=NULL;
- pHeaders = curl_slist_append(pHeaders, "pragma: no-cache");
- curl_easy_setopt(curl, CURLOPT_HTTPHEADER, pHeaders);
+ if(uw->mDownloadStatus != UPDATE_RESOURCES){
+ /*caching breaks things when resources2.txt is cached
+ *so caching is turned off on the proxy with this header
+ *change*/
+ 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)
{
@@ -341,7 +344,9 @@ int UpdaterWindow::downloadThread(void *ptr)
curl_easy_cleanup(curl);
- curl_slist_free_all(pHeaders);
+ if(uw->mDownloadStatus != UPDATE_RESOURCES){
+ curl_slist_free_all(pHeaders);
+ }
if (!uw->mStoreInMemory)
{