summaryrefslogtreecommitdiff
path: root/lib/http.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-12-12 22:17:51 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-12-12 22:17:51 +0000
commit83a6b348037048c389fbe859d7e3ea3e290a7644 (patch)
tree2145d172a149a3cedd8221a12fc81bf1b3e057c4 /lib/http.h
parent43fefab2a13e3c37885575d9b7746c1897b39974 (diff)
downloadcurl-83a6b348037048c389fbe859d7e3ea3e290a7644.tar.gz
split out more protocol-specific structs from urldata.h into their own
protocol-specific header files
Diffstat (limited to 'lib/http.h')
-rw-r--r--lib/http.h39
1 files changed, 37 insertions, 2 deletions
diff --git a/lib/http.h b/lib/http.h
index 1c53120dd..8908130f9 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -8,7 +8,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2009, 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
@@ -87,5 +87,40 @@ int Curl_http_should_fail(struct connectdata *conn);
#define TINY_INITIAL_POST_SIZE 1024
#endif
-#endif
+#endif /* CURL_DISABLE_HTTP */
+
+/****************************************************************************
+ * HTTP unique setup
+ ***************************************************************************/
+struct HTTP {
+ struct FormData *sendit;
+ curl_off_t postsize; /* off_t to handle large file sizes */
+ const char *postdata;
+
+ const char *p_pragma; /* Pragma: string */
+ const char *p_accept; /* Accept: string */
+ curl_off_t readbytecount;
+ curl_off_t writebytecount;
+
+ /* For FORM posting */
+ struct Form form;
+
+ struct back {
+ curl_read_callback fread_func; /* backup storage for fread pointer */
+ void *fread_in; /* backup storage for fread_in pointer */
+ const char *postdata;
+ curl_off_t postsize;
+ } backup;
+
+ enum {
+ HTTPSEND_NADA, /* init */
+ HTTPSEND_REQUEST, /* sending a request */
+ HTTPSEND_BODY, /* sending body */
+ HTTPSEND_LAST /* never use this */
+ } sending;
+
+ void *send_buffer; /* used if the request couldn't be sent in one chunk,
+ points to an allocated send_buffer struct */
+};
+
#endif