summaryrefslogtreecommitdiff
path: root/lib/http_proxy.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2011-04-04 16:24:37 +0200
committerDaniel Stenberg <daniel@haxx.se>2011-04-04 19:38:00 +0200
commit02dbfa21921aded6bba292b99dd224fe450e7254 (patch)
tree73794776eccad853522867c7c755b0bdeda3672f /lib/http_proxy.h
parent9d1e914a56e8a4030d8917875eaedaddf5cff97c (diff)
downloadcurl-02dbfa21921aded6bba292b99dd224fe450e7254.tar.gz
http-proxy: move proxy code to http_proxy.c
The new http_proxy.* files now host HTTP proxy specific code (500+ lines moved out from http.c), and as a consequence there is a macro introduced for the Curl_proxyCONNECT() function so that code can use it without actually supporting proxy (or HTTP) in builds.
Diffstat (limited to 'lib/http_proxy.h')
-rw-r--r--lib/http_proxy.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/http_proxy.h b/lib/http_proxy.h
new file mode 100644
index 000000000..da08fa50a
--- /dev/null
+++ b/lib/http_proxy.h
@@ -0,0 +1,33 @@
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
+/* ftp can use this as well */
+CURLcode Curl_proxyCONNECT(struct connectdata *conn,
+ int tunnelsocket,
+ const char *hostname, unsigned short remote_port);
+
+/* Default proxy timeout in milliseconds */
+#define PROXY_TIMEOUT (3600*1000)
+
+#else
+#define Curl_proxyCONNECT(x,y,x,w) CURLE_FAILED_INIT
+#endif