aboutsummaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
authorGuenter Knauf <lists@gknw.net>2014-12-13 15:02:30 +0100
committerGuenter Knauf <lists@gknw.net>2014-12-13 15:02:30 +0100
commitc0fc9066a96eaccfc22ca5e4d275cd2bbdd107c6 (patch)
tree8320e4c733b36e86f3ac0f065dbba7ba2a4ed7aa /docs/examples
parentbd7d7f4523f12a52f66b6a6645af5e2a4bd4cb7e (diff)
synctime.c: added own user-agent string.
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/synctime.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/examples/synctime.c b/docs/examples/synctime.c
index c9565d4af..cd7d0731b 100644
--- a/docs/examples/synctime.c
+++ b/docs/examples/synctime.c
@@ -92,8 +92,7 @@
#define MAX_STRING 256
#define MAX_STRING1 MAX_STRING+1
-/* Trick Webserver by claiming that you are using Microsoft WinXP SP2, IE8 */
-/* #define UA "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; SV1)" */
+#define SYNCTIME_UA "synctime/1.0"
typedef struct
{
@@ -188,8 +187,8 @@ void SyncTime_CURL_Init(CURL *curl, char *proxy_port,
if (strlen(proxy_user_password) > 0)
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxy_user_password);
-#ifdef UA
- curl_easy_setopt(curl, CURLOPT_USERAGENT, UA);
+#ifdef SYNCTIME_UA
+ curl_easy_setopt(curl, CURLOPT_USERAGENT, SYNCTIME_UA);
#endif
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, *SyncTime_CURL_WriteOutput);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, *SyncTime_CURL_WriteHeader);