summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/fetch.c8
-rw-r--r--desktop/options.c3
-rw-r--r--desktop/options.h1
3 files changed, 12 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) {
diff --git a/desktop/options.c b/desktop/options.c
index aa0876f8e..3875a1d73 100644
--- a/desktop/options.c
+++ b/desktop/options.c
@@ -67,6 +67,8 @@ char *option_font_cursive;
char *option_font_fantasy;
/** Accept-Language header. */
char *option_accept_language = 0;
+/** Accept-Charset header. */
+char *option_accept_charset = 0;
/** Preferred maximum size of memory cache / bytes. */
int option_memory_cache_size = 2 * 1024 * 1024;
/** Preferred expiry age of disc cache / days. */
@@ -149,6 +151,7 @@ struct {
{ "font_cursive", OPTION_STRING, &option_font_cursive },
{ "font_fantasy", OPTION_STRING, &option_font_fantasy },
{ "accept_language", OPTION_STRING, &option_accept_language },
+ { "accept_charset", OPTION_STRING, &option_accept_charset },
{ "memory_cache_size", OPTION_INTEGER, &option_memory_cache_size },
{ "disc_cache_age", OPTION_INTEGER, &option_disc_cache_age },
{ "block_advertisements", OPTION_BOOL, &option_block_ads },
diff --git a/desktop/options.h b/desktop/options.h
index 47f36d91e..a394204ec 100644
--- a/desktop/options.h
+++ b/desktop/options.h
@@ -40,6 +40,7 @@ extern char *option_http_proxy_auth_pass;
extern int option_font_size;
extern int option_font_min_size;
extern char *option_accept_language;
+extern char *option_accept_charset;
extern int option_memory_cache_size;
extern int option_disc_cache_age;
extern bool option_block_ads;