From ccacde4192268fbf5250e9bd6894d158f957922c Mon Sep 17 00:00:00 2001 From: Kraant Date: Sun, 10 Aug 2008 10:56:58 +0000 Subject: Set headers for CURL so that proxies won't cache files to fix bug that causes resources2.txt to be old and out of sync with the files in the directory. --- src/gui/updatewindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index d8f23171..90cd66da 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -317,6 +317,13 @@ 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 ((res = curl_easy_perform(curl)) != 0) { uw->mDownloadStatus = UPDATE_ERROR; @@ -341,6 +348,8 @@ int UpdaterWindow::downloadThread(void *ptr) curl_easy_cleanup(curl); + curl_slist_free_all(pHeaders); + if (!uw->mStoreInMemory) { // Don't check resources2.txt checksum -- cgit v1.2.3-70-g09d2