synctime.c: added own user-agent string.
This commit is contained in:
@@ -92,8 +92,7 @@
|
|||||||
#define MAX_STRING 256
|
#define MAX_STRING 256
|
||||||
#define MAX_STRING1 MAX_STRING+1
|
#define MAX_STRING1 MAX_STRING+1
|
||||||
|
|
||||||
/* Trick Webserver by claiming that you are using Microsoft WinXP SP2, IE8 */
|
#define SYNCTIME_UA "synctime/1.0"
|
||||||
/* #define UA "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; SV1)" */
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -188,8 +187,8 @@ void SyncTime_CURL_Init(CURL *curl, char *proxy_port,
|
|||||||
if (strlen(proxy_user_password) > 0)
|
if (strlen(proxy_user_password) > 0)
|
||||||
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user_password);
|
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user_password);
|
||||||
|
|
||||||
#ifdef UA
|
#ifdef SYNCTIME_UA
|
||||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, UA);
|
curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
|
||||||
#endif
|
#endif
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput);
|
||||||
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader);
|
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader);
|
||||||
|
Reference in New Issue
Block a user