aboutsummaryrefslogtreecommitdiff
path: root/lib/http.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.h
parent9d1e914a56e8a4030d8917875eaedaddf5cff97c (diff)
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.h')
-rw-r--r--lib/http.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/lib/http.h b/lib/http.h
index 3007c319f..fab2bfd25 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -8,7 +8,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * 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
@@ -66,12 +66,6 @@ CURLcode Curl_add_timecondition(struct SessionHandle *data,
CURLcode Curl_add_custom_headers(struct connectdata *conn,
Curl_send_buffer *req_buffer);
-
-/* ftp can use this as well */
-CURLcode Curl_proxyCONNECT(struct connectdata *conn,
- int tunnelsocket,
- const char *hostname, unsigned short remote_port);
-
/* protocol-specific functions set up to be called by the main engine */
CURLcode Curl_http(struct connectdata *conn, bool *done);
CURLcode Curl_http_done(struct connectdata *, CURLcode, bool premature);
@@ -158,4 +152,25 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data,
ssize_t *nread,
bool *stop_reading);
+/**
+ * Curl_http_output_auth() setups the authentication headers for the
+ * host/proxy and the correct authentication
+ * method. conn->data->state.authdone is set to TRUE when authentication is
+ * done.
+ *
+ * @param conn all information about the current connection
+ * @param request pointer to the request keyword
+ * @param path pointer to the requested path
+ * @param proxytunnel boolean if this is the request setting up a "proxy
+ * tunnel"
+ *
+ * @returns CURLcode
+ */
+CURLcode
+Curl_http_output_auth(struct connectdata *conn,
+ const char *request,
+ const char *path,
+ bool proxytunnel); /* TRUE if this is the request setting
+ up the proxy tunnel */
+
#endif