Ticket #8669: curl.c.diff
File curl.c.diff, 1.2 KB (added by blb@…, 19 years ago) |
---|
-
base/src/pextlib1.0/curl.c
old new 149 149 const char* theURL; 150 150 const char* theFilePath; 151 151 CURLcode theCurlCode; 152 struct curl_slist *headers = NULL; 152 153 153 154 /* we might have options and then the url and the file */ 154 155 /* let's process the options first */ … … 280 281 } 281 282 } 282 283 284 /* Clear the Pragma: no-cache header */ 285 headers = curl_slist_append(headers, "Pragma:"); 286 theCurlCode = curl_easy_setopt(theHandle, CURLOPT_HTTPHEADER, headers); 287 if (theCurlCode != CURLE_OK) { 288 theResult = SetResultFromCurlErrorCode(interp, theCurlCode); 289 break; 290 } 291 283 292 /* actually fetch the resource */ 284 293 theCurlCode = curl_easy_perform(theHandle); 285 294 if (theCurlCode != CURLE_OK) { … … 291 300 (void) fclose( theFile ); 292 301 theFile = NULL; 293 302 303 /* free header memory */ 304 curl_slist_free_all(headers); 305 294 306 /* If --effective-url option was given, set given variable name to last effective url used by curl */ 295 307 if (effectiveURLVarName != NULL) { 296 308 theCurlCode = curl_easy_getinfo(theHandle, CURLINFO_EFFECTIVE_URL, &effectiveURL);