aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-01-26 15:52:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-01-26 15:52:01 +0000
commitfcb347d1249df552ef37faf47e2a15dbed5e7ce5 (patch)
treedc182c3d2ab87357d685141b9326381b27e3c282 /lib/urldata.h
parentc331ef02f9f2284c49826ac1485e8d1b1bd890f1 (diff)
Added a httpreq field in the main struct so that there's one field to check
for what HTTP request that is being used. The old bit-style fields are still in there as well.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 6a56eb1d0..e053caffd 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -278,9 +278,25 @@ struct FTP {
char *file; /* decoded file */
};
+typedef enum {
+ HTTPREQ_NONE, /* first in list */
+ HTTPREQ_GET,
+ HTTPREQ_POST,
+ HTTPREQ_POST_FORM, /* we make a difference internally */
+ HTTPREQ_PUT,
+ HTTPREQ_CUSTOM,
+ HTTPREQ_LAST /* last in list */
+} Curl_HttpReq;
+
/* This struct is for boolean settings that define how to behave during
this session. */
struct Configbits {
+ /* these four request types mirror the httpreq field */
+ bool http_formpost;
+ bool http_post;
+ bool http_put;
+ bool http_get;
+
bool get_filetime;
bool tunnel_thru_httpproxy;
bool ftp_append;
@@ -290,10 +306,7 @@ struct Configbits {
bool hide_progress;
bool http_fail_on_error;
bool http_follow_location;
- bool http_formpost;
bool http_include_header;
- bool http_post;
- bool http_put;
bool http_set_referer;
bool http_auto_referer; /* set "correct" referer when following location: */
bool httpproxy;
@@ -308,7 +321,6 @@ struct Configbits {
bool verbose;
bool this_is_a_follow; /* this is a followed Location: request */
bool krb4; /* kerberos4 connection requested */
-
bool proxystringalloc; /* the http proxy string is malloc()'ed */
bool rangestringalloc; /* the range string is malloc()'ed */
bool urlstringalloc; /* the URL string is malloc()'ed */
@@ -481,6 +493,8 @@ struct UrlData {
TimeCond timecondition; /* kind of comparison */
time_t timevalue; /* what time to compare with */
+ Curl_HttpReq httpreq; /* what kind of HTTP request (if any) is this */
+
char *customrequest; /* http/ftp request to use */
char *headerbuff; /* allocated buffer to store headers in */