summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-03-08 00:03:58 +0000
committerJames Bursa <james@netsurf-browser.org>2004-03-08 00:03:58 +0000
commit7d9bf053b4ca97fd25359d7ea063d9233ed5c63a (patch)
treed36c4fc2379648c57f7ef3c2045b4153de82dbbd /content
parent1237e077c7c2acfe3a5d6dfc997115839b418db8 (diff)
downloadnetsurf-7d9bf053b4ca97fd25359d7ea063d9233ed5c63a.tar.gz
netsurf-7d9bf053b4ca97fd25359d7ea063d9233ed5c63a.tar.bz2
[project @ 2004-03-08 00:03:58 by bursa]
Implement Accept-Language option. svn path=/import/netsurf/; revision=591
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 6d35cb29c..22609a05b 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -276,6 +276,13 @@ struct fetch * fetch_start(char *url, char *referer,
/* remove curl default headers */
fetch->headers = curl_slist_append(fetch->headers, "Accept:");
fetch->headers = curl_slist_append(fetch->headers, "Pragma:");
+ if (option_accept_language) {
+ char s[80];
+ snprintf(s, sizeof s, "Accept-Language: %s, *;q=0.1",
+ option_accept_language);
+ s[sizeof s - 1] = 0;
+ fetch->headers = curl_slist_append(fetch->headers, s);
+ }
code = curl_easy_setopt(fetch->curl_handle, CURLOPT_HTTPHEADER, fetch->headers);
assert(code == CURLE_OK);