|
|
| |
#include "wwfetch_internal.h" | #include "wwfetch_internal.h" |
| |
|
#define GAIA_USERAGENT "gaia/" GAIA_VERSION |
|
|
/** | /** |
* Internal function used in curl | * Internal function used in curl |
* | * |
|
|
if ((handle->lastcurlerror = curl_easy_setopt(handle->curl, CURLOPT_HTTPHEADER, handle->curlheaders)) != CURLE_OK) | if ((handle->lastcurlerror = curl_easy_setopt(handle->curl, CURLOPT_HTTPHEADER, handle->curlheaders)) != CURLE_OK) |
return WWFETCH_CURL_ERROR; | return WWFETCH_CURL_ERROR; |
| |
if ((handle->lastcurlerror = curl_easy_setopt(handle->curl, CURLOPT_USERAGENT, "gaia/%s", GAIA_VERSION)) != CURLE_OK) |
if ((handle->lastcurlerror = curl_easy_setopt(handle->curl, CURLOPT_USERAGENT, GAIA_USERAGENT)) != CURLE_OK) |
return WWFETCH_CURL_ERROR; | return WWFETCH_CURL_ERROR; |
| |
if ((handle->lastcurlerror = curl_easy_setopt(handle->curl, CURLOPT_URL, url)) != CURLE_OK) | if ((handle->lastcurlerror = curl_easy_setopt(handle->curl, CURLOPT_URL, url)) != CURLE_OK) |