+ curl_easy_setopt(curl, CURLOPT_USERAGENT, "conky-curl/1.1");
+ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1000);
+ curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60);
+
+ if (curloc->last_modified) {
+ const char *header = "If-Modified-Since: ";
+ int len = strlen(header) + strlen(curloc->last_modified) + 1;
+ char *str = (char*) malloc(len);
+ snprintf(str, len, "%s%s", header, curloc->last_modified);
+ headers = curl_slist_append(headers, str);
+ free(str);
+ }
+ if (curloc->etag) {
+ const char *header = "If-None-Match: ";
+ int len = strlen(header) + strlen(curloc->etag) + 1;
+ char *str = (char*) malloc(len);
+ snprintf(str, len, "%s%s", header, curloc->etag);
+ headers = curl_slist_append(headers, str);
+ free(str);
+ }
+ if (headers) {
+ curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
+ }