summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2006-12-28 00:42:14 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2006-12-28 00:42:14 +0000
commit98b451ffaeedf9f5b0d4ab249c9f8eb216988eb1 (patch)
tree867e939cb3fd62d4c767f22ee728b225b89ace26 /content
parentabcce3dfe7c372b0b81ac747d7c40e2325c52d11 (diff)
downloadnetsurf-98b451ffaeedf9f5b0d4ab249c9f8eb216988eb1.tar.gz
netsurf-98b451ffaeedf9f5b0d4ab249c9f8eb216988eb1.tar.bz2
Add option to set Accept-Charset header (Stefaan Claes)
svn path=/trunk/netsurf/; revision=3124
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/content/fetch.c b/content/fetch.c
index b4eec2d06..7fb082f02 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -431,6 +431,14 @@ struct fetch * fetch_start(char *url, char *referer,
APPEND(fetch->headers, s);
}
+ if (option_accept_charset) {
+ char s[80];
+ snprintf(s, sizeof s, "Accept-Charset: %s, *;q=0.1",
+ option_accept_charset);
+ s[sizeof s - 1] = 0;
+ APPEND(fetch->headers, s);
+ }
+
/* And add any headers specified by the caller */
for (i = 0; headers[i]; i++) {
if (strncasecmp(headers[i], "If-Modified-Since:", 18) == 0) {