- if (strstr(uri, ".google.com"))
- curl_easy_setopt ( curl, CURLOPT_REFERER, "http://maps.google.com/");
- if (cookie_file = get_cookie_file(FALSE))
+ curl_easy_setopt ( curl, CURLOPT_WRITEFUNCTION, curl_write_func);
+ if (options != NULL) {
+ if(options->referer != NULL)
+ curl_easy_setopt ( curl, CURLOPT_REFERER, options->referer);
+ if(options->follow_location != 0) {
+ curl_easy_setopt ( curl, CURLOPT_FOLLOWLOCATION, 1);
+ curl_easy_setopt ( curl, CURLOPT_MAXREDIRS, options->follow_location);
+ }
+ }
+ curl_easy_setopt ( curl, CURLOPT_USERAGENT, PACKAGE "/" VERSION " libcurl/7.15.4" );
+ if ((cookie_file = get_cookie_file(FALSE)) != NULL)