aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-12-10 13:10:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-12-10 13:10:00 +0000
commitdb6ff224f8ac1ffb0c99ad6ce17e32d30e463e9c (patch)
tree5bfd5d0131dd7b895e54c264b4a3cac98a1c9da4 /lib/urldata.h
parentb3c7cd61f3f7133ef6dbf893a5af976d432bafcc (diff)
The initial HTTP request can now be sent in multiple parts, as part of the
regular transfer process. This required some new tweaks, like for example we need to be able to tell the tranfer loop to not chunky-encode uploads while we're transferring the rest of the request...
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 6e66d2483..0a54b0ee4 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -157,6 +157,8 @@ struct ssl_config_data {
struct HTTP {
struct FormData *sendit;
int postsize;
+ char *postdata;
+
const char *p_pragma; /* Pragma: string */
const char *p_accept; /* Accept: string */
long readbytecount;
@@ -166,7 +168,22 @@ struct HTTP {
struct Form form;
struct Curl_chunker chunk;
- char *postdata; /* for regular POSTs */
+ struct back {
+ curl_read_callback fread; /* backup storage for fread pointer */
+ void *fread_in; /* backup storage for fread_in pointer */
+ char *postdata;
+ int 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 */
};
/****************************************************************************
@@ -221,8 +238,11 @@ struct ConnectBits {
bool upload_chunky; /* set TRUE if we are doing chunked transfer-encoding
on upload */
+ bool getheader; /* TRUE if header parsing is wanted */
- bool getheader; /* TRUE if header parsing is wanted */
+ bool forbidchunk; /* used only to explicitly forbid chunk-upload for
+ specific upload buffers. See readmoredata() in
+ http.c for details. */
};
/*