summaryrefslogtreecommitdiff
path: root/src/gui/updatewindow.cpp
diff options
context:
space:
mode:
authorKraant <kraant@gmail.com>2008-08-10 13:00:33 +0000
committerKraant <kraant@gmail.com>2008-08-10 13:00:33 +0000
commit3206b3254a1a9b90bbdbd1a7178e4df043a5ee26 (patch)
treee457af030d41a0ce39f83bd37a7d58f7f80105fe /src/gui/updatewindow.cpp
parentccacde4192268fbf5250e9bd6894d158f957922c (diff)
downloadmana-3206b3254a1a9b90bbdbd1a7178e4df043a5ee26.tar.gz
mana-3206b3254a1a9b90bbdbd1a7178e4df043a5ee26.tar.bz2
mana-3206b3254a1a9b90bbdbd1a7178e4df043a5ee26.tar.xz
mana-3206b3254a1a9b90bbdbd1a7178e4df043a5ee26.zip
Changed proxy fix to only tell the proxy to no-cache
for news.txt and resources2.txt and added linux to windows cross-compile codeblocks file.
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 90cd66da..22e361c5 100644
--- a/src/gui/updatewindow.cpp
+++ b/src/gui/updatewindow.cpp
@@ -317,12 +317,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)
{
@@ -348,7 +351,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)
{