summaryrefslogtreecommitdiff
path: root/httpup.cpp
diff options
context:
space:
mode:
authorFredrik Rinnestam <fredrik@crux.nu>2017-06-18 01:30:29 +0200
committerFredrik Rinnestam <fredrik@crux.nu>2017-06-18 01:30:29 +0200
commit1e5341db7fd24bdd9bddf2fece098ace0ffb54ab (patch)
treecbec726c21186e47c767c46c94acf18406e0ff73 /httpup.cpp
parent10f884d6455f266e685f863e507806c9bb19e5ae (diff)
downloadhttpup-1e5341db7fd24bdd9bddf2fece098ace0ffb54ab.tar.gz
httpup-1e5341db7fd24bdd9bddf2fece098ace0ffb54ab.tar.xz
curl: don't use cached results. FS#815
Diffstat (limited to 'httpup.cpp')
-rw-r--r--httpup.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/httpup.cpp b/httpup.cpp
index 56f1293..c293853 100644
--- a/httpup.cpp
+++ b/httpup.cpp
@@ -227,7 +227,13 @@ int HttpUp::exec(ExecType type)
curl_global_init(CURL_GLOBAL_ALL);
curl = curl_easy_init();
+ struct curl_slist *headers=NULL;
+ headers = curl_slist_append(headers, "Cache-Control: no-cache, must-revalidate");
+ headers = curl_slist_append(headers, "Pragma: no-cache");
+
+
char errorBuffer[CURL_ERROR_SIZE];
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errorBuffer);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);

Generated by cgit