summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2010-04-10 12:24:25 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2010-04-10 12:24:25 +0000
commit24c853281d127cdb556c2f49b41330f9e342faab (patch)
tree8933d0c0aceb4bd646352d8568fb73189d28f22a /content
parentee2a5b40ce9c77d6549476a9d0085a6c0cbde386 (diff)
downloadnetsurf-24c853281d127cdb556c2f49b41330f9e342faab.tar.gz
netsurf-24c853281d127cdb556c2f49b41330f9e342faab.tar.bz2
Return cookies to the same level of working/brokenness as they had before new-cache.
svn path=/trunk/netsurf/; revision=10340
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/content/fetch.c b/content/fetch.c
index b1c2e216c..86671de46 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -720,6 +720,15 @@ fetch_set_cookie(struct fetch *fetch, const char *data)
* that the request uri and the parent domain match,
* so don't pass in any referer/parent in this case. */
urldb_set_cookie(data, fetch->url, NULL);
+ } else if (fetch->referer != NULL) {
+ /* Permit the cookie to be set if the fetch is unverifiable
+ * and the fetch URI domain matches the referer. */
+ /** \todo Long-term, this needs to be replaced with a
+ * comparison against the origin fetch URI. In the case
+ * where a nested object requests a fetch, the origin URI
+ * is the nested object's parent URI, whereas the referer
+ * for the fetch will be the nested object's URI. */
+ urldb_set_cookie(data, fetch->url, fetch->referer);
}
}