summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2010-04-08 11:47:05 +0000
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2010-04-08 11:47:05 +0000
commit2b1146bcb3c9febc89d53c49d88559f70b56043e (patch)
treee71d86fd0c29a73d1be7132e8ac370445901dba0 /content/fetch.c
parent6948496d45f9de4554644346b62421c60c0a340e (diff)
downloadnetsurf-2b1146bcb3c9febc89d53c49d88559f70b56043e.tar.gz
netsurf-2b1146bcb3c9febc89d53c49d88559f70b56043e.tar.bz2
Remove parent from fetches, clearing a todo from llcache.c
svn path=/trunk/netsurf/; revision=10299
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 627d7caf0..acb4b3766 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -75,7 +75,6 @@ struct fetch {
char *referer; /**< Referer URL. */
bool send_referer; /**< Valid to send the referer */
bool verifiable; /**< Transaction is verifiable */
- struct content *parent; /**< Parent content, or NULL */
void *p; /**< Private data for callback. */
char *host; /**< Host part of URL. */
long http_code; /**< HTTP response code, or 0. */
@@ -213,8 +212,7 @@ struct fetch * fetch_start(const char *url, const char *referer,
fetch_callback callback,
void *p, bool only_2xx, const char *post_urlenc,
struct fetch_multipart_data *post_multipart,
- bool verifiable, struct content *parent,
- char *headers[])
+ bool verifiable, char *headers[])
{
char *host;
struct fetch *fetch;
@@ -261,7 +259,6 @@ struct fetch * fetch_start(const char *url, const char *referer,
fetch->callback = callback;
fetch->url = strdup(url);
fetch->verifiable = verifiable;
- fetch->parent = parent;
fetch->p = p;
fetch->host = host;
fetch->http_code = 0;
@@ -572,19 +569,6 @@ const char *fetch_get_referer(struct fetch *fetch)
}
/**
- * Get the parent URL for this fetch
- *
- * \param fetch fetch to retrieve parent url from
- * \return Pointer to parent content, or NULL if none.
- */
-struct content *fetch_get_parent(struct fetch *fetch)
-{
- assert(fetch);
-
- return fetch->parent;
-}
-
-/**
* Determine if a fetch was verifiable
*
* \param fetch Fetch to consider
@@ -728,16 +712,14 @@ fetch_set_cookie(struct fetch *fetch, const char *data)
{
assert(fetch && data);
- /* If the fetch is unverifiable and there's no parent content,
- * err on the side of caution and do not set the cookie */
+ /* If the fetch is unverifiable err on the side of caution and
+ * do not set the cookie */
- if (fetch->verifiable || fetch->parent) {
+ if (fetch->verifiable) {
/* If the transaction's verifiable, we don't require
* that the request uri and the parent domain match,
- * so don't pass in the parent in this case. */
- urldb_set_cookie(data, fetch->url,
- fetch->verifiable ? NULL
- : content_get_url(fetch->parent));
+ * so don't pass in any referer/parent in this case. */
+ urldb_set_cookie(data, fetch->url, NULL);
}
}