diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/updatewindow.cpp | 17 |
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) { |