From 0dab93fe7652dd1f1c656356a62f01d4053bb2ff Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 20 Jan 2004 19:08:34 +0000 Subject: [project @ 2004-01-20 19:08:34 by jmb] Allow toggling of POST support. Add new toolbar icon numbers to riscos/gui.h svn path=/import/netsurf/; revision=490 --- content/fetchcache.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'content/fetchcache.c') diff --git a/content/fetchcache.c b/content/fetchcache.c index b3eac27fa..4cec561dc 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -47,8 +47,11 @@ struct content * fetchcache(const char *url0, char *referer, void (*callback)(content_msg msg, struct content *c, void *p1, void *p2, const char *error), void *p1, void *p2, unsigned long width, unsigned long height, - bool only_2xx, char *post_urlenc, + bool only_2xx +#ifdef WITH_POST + , char *post_urlenc, struct form_successful_control *post_multipart +#endif #ifdef WITH_COOKIES ,bool cookies #endif @@ -64,6 +67,7 @@ struct content * fetchcache(const char *url0, char *referer, LOG(("url %s", url)); +#ifdef WITH_POST if (!post_urlenc && !post_multipart) { c = cache_get(url); if (c != 0) { @@ -72,16 +76,22 @@ struct content * fetchcache(const char *url0, char *referer, return c; } } +#endif c = content_create(url); content_add_user(c, callback, p1, p2); + +#ifdef WITH_POST if (!post_urlenc && !post_multipart) cache_put(c); +#endif c->fetch_size = 0; c->width = width; c->height = height; - c->fetch = fetch_start(url, referer, fetchcache_callback, c, only_2xx, - post_urlenc, post_multipart + c->fetch = fetch_start(url, referer, fetchcache_callback, c, only_2xx +#ifdef WITH_POST + ,post_urlenc, post_multipart +#endif #ifdef WITH_COOKIES ,cookies #endif -- cgit v1.2.3