summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2006-06-29 00:01:24 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2006-06-29 00:01:24 +0000
commit83ef76adc706635db7bdcb5871b8de78001fc6e7 (patch)
tree09ab04ce1d8f947e2426aa2c79dc34fca105be1a /content/fetch.c
parent3d6331efd7a83a3cb83224d44f355900b65d9971 (diff)
downloadnetsurf-83ef76adc706635db7bdcb5871b8de78001fc6e7.tar.gz
netsurf-83ef76adc706635db7bdcb5871b8de78001fc6e7.tar.bz2
Only accept cookies from cookie-enabled transactions
svn path=/trunk/netsurf/; revision=2668
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 619df0dfb..44d326f92 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -1174,7 +1174,8 @@ size_t fetch_curl_header(char *data, size_t size, size_t nmemb,
f->cachedata.last_modified =
curl_getdate(&data[i], NULL);
}
- } else if (11 < size && strncasecmp(data, "Set-Cookie:", 11) == 0) {
+ } else if (f->cookies && 11 < size &&
+ strncasecmp(data, "Set-Cookie:", 11) == 0) {
/* extract Set-Cookie header */
SKIP_ST(11);
urldb_set_cookie(&data[i], f->url);