diff options
Diffstat (limited to 'content')
-rw-r--r-- | content/fetch.c | 30 | ||||
-rw-r--r-- | content/fetch.h | 3 | ||||
-rw-r--r-- | content/llcache.c | 1 |
3 files changed, 7 insertions, 27 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); } } diff --git a/content/fetch.h b/content/fetch.h index 16dae63d0..24d8816b8 100644 --- a/content/fetch.h +++ b/content/fetch.h @@ -86,7 +86,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, + bool verifiable, char *headers[]); void fetch_abort(struct fetch *f); void fetch_poll(void); @@ -99,7 +99,6 @@ void fetch_change_callback(struct fetch *fetch, void *p); long fetch_http_code(struct fetch *fetch); const char *fetch_get_referer(struct fetch *fetch); -struct content *fetch_get_parent(struct fetch *fetch); bool fetch_get_verifiable(struct fetch *fetch); void fetch_multipart_data_destroy(struct fetch_multipart_data *list); diff --git a/content/llcache.c b/content/llcache.c index b9a19aabf..d2891d4c8 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -892,7 +892,6 @@ nserror llcache_object_refetch(llcache_object *object) object->fetch.flags & LLCACHE_RETRIEVE_NO_ERROR_PAGES, urlenc, multipart, object->fetch.flags & LLCACHE_RETRIEVE_VERIFIABLE, - NULL, /** \todo Remove parent from this API */ headers); /* Clean up cache-control headers */ |