summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c13
1 files changed, 12 insertions, 1 deletions
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);