From 745deb7a9d4bf26a6339a297c3c06bb12f5cc102 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 8 Jan 2006 01:51:33 +0000 Subject: [project @ 2006-01-08 01:51:33 by jmb] Make data file locations user-configurable (no UI for this as yet) Reduce intrusiveness of ncos modifications Fix GTK build Remove Cookies file details from Messages (this data never belonged in there anyway) Make gui_init more robust against memory exhaustion. svn path=/import/netsurf/; revision=2014 --- content/fetch.c | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) (limited to 'content') diff --git a/content/fetch.c b/content/fetch.c index e5878cf0d..9fa792f2c 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -38,9 +38,6 @@ #ifdef WITH_POST #include "netsurf/render/form.h" #endif -#ifdef riscos -#include "netsurf/riscos/gui.h" -#endif #define NDEBUG #include "netsurf/utils/log.h" #include "netsurf/utils/messages.h" @@ -101,10 +98,6 @@ static bool fetch_process_headers(struct fetch *f); static struct curl_httppost *fetch_post_convert(struct form_successful_control *control); #endif -#ifdef riscos -static char * ca_bundle; /**< SSL certificate bundle filename. */ -#endif - /** * Initialise the fetcher. @@ -126,13 +119,6 @@ void fetch_init(void) die("Failed to initialise the fetch module " "(curl_multi_init failed)."); -#ifdef riscos - ca_bundle = malloc(strlen(NETSURF_DIR) + 40); - if (!ca_bundle) - die("NoMemory"); - sprintf(ca_bundle, "%s.Resources.ca-bundle", NETSURF_DIR); -#endif - /* Create a curl easy handle with the options that are common to all fetches. */ fetch_blank_curl = curl_easy_init(); @@ -157,9 +143,9 @@ void fetch_init(void) SETOPT(CURLOPT_LOW_SPEED_TIME, 60L); SETOPT(CURLOPT_NOSIGNAL, 1L); SETOPT(CURLOPT_CONNECTTIMEOUT, 60L); -#ifdef riscos - SETOPT(CURLOPT_CAINFO, ca_bundle); -#endif + + if (option_ca_bundle) + SETOPT(CURLOPT_CAINFO, option_ca_bundle); if (!option_ssl_verify_certificates) { /* disable verification of SSL certificates. @@ -421,8 +407,10 @@ CURLcode fetch_set_options(struct fetch *f) SETOPT(CURLOPT_HTTPGET, 1L); } if (f->cookies) { - SETOPT(CURLOPT_COOKIEFILE, messages_get("cookiefile")); - SETOPT(CURLOPT_COOKIEJAR, messages_get("cookiejar")); + if (option_cookie_file) + SETOPT(CURLOPT_COOKIEFILE, option_cookie_file); + if (option_cookie_jar) + SETOPT(CURLOPT_COOKIEJAR, option_cookie_jar); } else { SETOPT(CURLOPT_COOKIEFILE, 0); SETOPT(CURLOPT_COOKIEJAR, 0); -- cgit v1.2.3