From 3206b3254a1a9b90bbdbd1a7178e4df043a5ee26 Mon Sep 17 00:00:00 2001 From: Kraant Date: Sun, 10 Aug 2008 13:00:33 +0000 Subject: 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. --- src/gui/updatewindow.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/gui/updatewindow.cpp') 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) { -- cgit v1.2.3-70-g09d2