From 98b451ffaeedf9f5b0d4ab249c9f8eb216988eb1 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 28 Dec 2006 00:42:14 +0000 Subject: Add option to set Accept-Charset header (Stefaan Claes) svn path=/trunk/netsurf/; revision=3124 --- content/fetch.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'content') 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) { -- cgit v1.2.3