From 9f81422aeaca41d8c93e2b69c3c525d84a9c633b Mon Sep 17 00:00:00 2001 From: Phil Mellor Date: Sun, 1 Jun 2003 23:02:56 +0000 Subject: [project @ 2003-06-01 23:02:56 by monkeyson] Configuration windows added. HTTP Proxy support (untested). svn path=/import/netsurf/; revision=145 --- content/fetch.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'content') diff --git a/content/fetch.c b/content/fetch.c index bbf6b2916..6838951b2 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -1,5 +1,5 @@ /** - * $Id: fetch.c,v 1.7 2003/04/25 08:03:15 bursa Exp $ + * $Id: fetch.c,v 1.8 2003/06/01 23:02:56 monkeyson Exp $ * * This module handles fetching of data from any url. * @@ -20,6 +20,7 @@ #include "netsurf/content/fetch.h" #include "netsurf/utils/utils.h" #include "netsurf/utils/log.h" +#include "netsurf/desktop/options.h" struct fetch { @@ -178,6 +179,16 @@ struct fetch * fetch_start(char *url, char *referer, code = curl_easy_setopt(fetch->curl_handle, CURLOPT_HTTPHEADER, fetch->headers); assert(code == CURLE_OK); + /* use proxy if options dictate this */ + if (OPTIONS.http) + { + code = curl_easy_setopt(fetch->curl_handle, CURLOPT_PROXY, OPTIONS.http_proxy); + assert(code == CURLE_OK); + code = curl_easy_setopt(fetch->curl_handle, CURLOPT_PROXYPORT, (long)OPTIONS.http_proxy); + assert(code == CURLE_OK); + } + + /* add to the global curl multi handle */ codem = curl_multi_add_handle(curl_multi, fetch->curl_handle); assert(codem == CURLM_OK || codem == CURLM_CALL_MULTI_PERFORM); -- cgit v1.2.3