From 5426a708a9010d04cf8baed45ce9909a09088ef6 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Tue, 30 Jan 2007 19:51:54 +0000 Subject: Generates and use a User-Agent: string based on new netsurf_version_major/minor values, and results of uname(). svn path=/trunk/netsurf/; revision=3158 --- content/fetch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'content/fetch.c') diff --git a/content/fetch.c b/content/fetch.c index 337e4a5ed..cead364a2 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -98,7 +98,7 @@ struct cache_handle { struct cache_handle *r_next; /**< Next cached handle in ring. */ }; -static const char * const user_agent = "NetSurf"; +static char *user_agent = "NetSurf"; CURLM *fetch_curl_multi; /**< Global cURL multi handle. */ /** Curl handle with default options set; not used for transfers. */ static CURL *fetch_blank_curl; @@ -212,6 +212,10 @@ static void fetch_dispatch_jobs(void); void fetch_init(void) { CURLcode code; + char *ua = make_useragent(); + + if (ua != NULL) + user_agent = ua; code = curl_global_init(CURL_GLOBAL_ALL); if (code != CURLE_OK) -- cgit v1.2.3