Home :: Documentation :: Download :: Development :: Community :: Wiki :: Ports :: Bugs :: Links :: About
Welcome to CRUX bug tracking.
Tasklist

FS#815 - core/httpup nocache to avoid stale ports.

Attached to Project: CRUX
Opened by Danny Rawlins (Romster) - Thursday, 19 April 2012, 15:00 GMT+2
Task Type Feature Request
Category ports
Status New
Assigned To CRUX Developers (crux)
Operating System Linux
Severity Low
Priority Normal
Reported Version 2.7
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

I'd like to propose httpup not to use cached results for ports as recent changes can sometimes return stale results, for those behind transparent proxies.

This patch resolves my problems. I have control over 1 transparent proxy that I have here but I also have another transparent proxy in Melbourne that I can not do anything about, other than not use cached files, hence this patch.

diff -pruN httpup-0.4.0k.orig/httpup.cpp httpup-0.4.0k/httpup.cpp
--- httpup-0.4.0k.orig/httpup.cpp 2012-04-19 12:49:15.722730627 +0000
+++ httpup-0.4.0k/httpup.cpp 2012-04-19 12:53:23.280723487 +0000
@@ -227,7 +227,12 @@ 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);
This task depends upon

Loading...