diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2007-01-30 19:51:54 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2007-01-30 19:51:54 +0000 |
commit | 5426a708a9010d04cf8baed45ce9909a09088ef6 (patch) | |
tree | 9dc519c8edf0d3a186920fcf9f1e2e9e0df91ff6 /content/fetch.c | |
parent | 7c88381a59771a3e0be35800af3496da1171e9a4 (diff) | |
download | netsurf-5426a708a9010d04cf8baed45ce9909a09088ef6.tar.gz netsurf-5426a708a9010d04cf8baed45ce9909a09088ef6.tar.bz2 |
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
Diffstat (limited to 'content/fetch.c')
-rw-r--r-- | content/fetch.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) |