summaryrefslogtreecommitdiff
path: root/content/fetchers/fetch_curl.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2007-07-21 08:53:00 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2007-07-21 08:53:00 +0000
commit40b1c808960f06ec35baddb7c507e410e86ce620 (patch)
tree244fbb4e06d3aec3e9b2c376606ee65112268922 /content/fetchers/fetch_curl.c
parentd2c3d22f521ae71f0da181d2b3f3914046e2c10f (diff)
downloadnetsurf-40b1c808960f06ec35baddb7c507e410e86ce620.tar.gz
netsurf-40b1c808960f06ec35baddb7c507e410e86ce620.tar.bz2
Ensure option strings aren't blank before setting headers: previously, a blank option string could result in "Accept-Language: , *;q=0.1" being sent, for example.
svn path=/trunk/netsurf/; revision=3450
Diffstat (limited to 'content/fetchers/fetch_curl.c')
-rw-r--r--content/fetchers/fetch_curl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/fetchers/fetch_curl.c b/content/fetchers/fetch_curl.c
index 8587c9b1d..ff9534b3f 100644
--- a/content/fetchers/fetch_curl.c
+++ b/content/fetchers/fetch_curl.c
@@ -373,7 +373,7 @@ void * fetch_curl_setup(struct fetch *parent_fetch, const char *url,
* which fails with lighttpd, so disable it (see bug 1429054) */
APPEND(fetch->headers, "Expect:");
- if (option_accept_language) {
+ if (option_accept_language && option_accept_language[0] != '\0') {
char s[80];
snprintf(s, sizeof s, "Accept-Language: %s, *;q=0.1",
option_accept_language);
@@ -381,7 +381,7 @@ void * fetch_curl_setup(struct fetch *parent_fetch, const char *url,
APPEND(fetch->headers, s);
}
- if (option_accept_charset) {
+ if (option_accept_charset && option_accept_charset[0] != '\0') {
char s[80];
snprintf(s, sizeof s, "Accept-Charset: %s, *;q=0.1",
option_accept_charset);