From 40b1c808960f06ec35baddb7c507e410e86ce620 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 21 Jul 2007 08:53:00 +0000 Subject: 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 --- content/fetchers/fetch_curl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content/fetchers') 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); -- cgit v1.2.3