diff options
author | Fredrik Rinnestam <fredrik@crux.nu> | 2017-06-18 01:30:29 +0200 |
---|---|---|
committer | Fredrik Rinnestam <fredrik@crux.nu> | 2017-06-18 01:30:29 +0200 |
commit | 1e5341db7fd24bdd9bddf2fece098ace0ffb54ab (patch) | |
tree | cbec726c21186e47c767c46c94acf18406e0ff73 | |
parent | 10f884d6455f266e685f863e507806c9bb19e5ae (diff) | |
download | httpup-1e5341db7fd24bdd9bddf2fece098ace0ffb54ab.tar.gz httpup-1e5341db7fd24bdd9bddf2fece098ace0ffb54ab.tar.xz |
curl: don't use cached results. FS#815
-rw-r--r-- | httpup.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |