r9642 jmb - /branches/jmb/new-cache/content/llcache.c

netsurf at semichrome.net netsurf at semichrome.net
Thu Oct 15 02:24:47 BST 2009


Author: jmb
Date: Wed Oct 14 20:24:47 2009
New Revision: 9642

URL: http://source.netsurf-browser.org?rev=9642&view=rev
Log:
It turns out that fetch_start::headers can't be NULL, and must point to a NULL-terminated array of headers. It'd probably help if this were documented. Then again, fetch_start()'s API is dire, not least with respect to const.

Modified:
    branches/jmb/new-cache/content/llcache.c

Modified: branches/jmb/new-cache/content/llcache.c
URL: http://source.netsurf-browser.org/branches/jmb/new-cache/content/llcache.c?rev=9642&r1=9641&r2=9642&view=diff
==============================================================================
--- branches/jmb/new-cache/content/llcache.c (original)
+++ branches/jmb/new-cache/content/llcache.c Wed Oct 14 20:24:47 2009
@@ -689,7 +689,10 @@
 nserror llcache_object_refetch(llcache_object *object)
 {
 	const char *urlenc = NULL;
+	/** \todo Why is fetch_start's post_multipart parameter not const? */
 	struct fetch_multipart_data *multipart = NULL;
+	/** \todo Why is the headers parameter of fetch_start not const? */
+	char *headers = NULL;
 
 	if (object->fetch.post != NULL) {
 		if (object->fetch.post->type == LLCACHE_POST_URL_ENCODED)
@@ -704,7 +707,7 @@
 			urlenc, multipart,
 			object->fetch.flags & LLCACHE_RETRIEVE_VERIFIABLE,
 			NULL, /** \todo Remove parent from this API */
-			NULL /** \todo Generate cache-control headers */);
+			&headers /** \todo Generate cache-control headers */);
 	if (object->fetch.fetch == NULL)
 		return NSERROR_NOMEM;
 




More information about the netsurf-commits mailing list