diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-03-13 20:56:13 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-03-13 20:56:13 +0000 |
commit | 553ed99e3b5fce75e02167bb291b214576573ea9 (patch) | |
tree | 1c5a4be7af60887b1ad21df63565d9637197d699 /lib/urldata.h | |
parent | b74cdee6abf2a36300110fcc6d24de9c4a32263d (diff) |
Change the confusing two variables for the expect 100 continue stuff into
a single state variable to make the code easier to follow and understand.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r-- | lib/urldata.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/urldata.h b/lib/urldata.h index 95ef36b82..ce6287190 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -672,6 +672,14 @@ typedef CURLcode (*Curl_do_more_func)(struct connectdata *); typedef CURLcode (*Curl_done_func)(struct connectdata *, CURLcode, bool); +enum expect100 { + EXP100_SEND_DATA, /* enough waiting, just send the body now */ + EXP100_AWAITING_CONTINUE, /* waiting for the 100 Continue header */ + EXP100_SENDING_REQUEST, /* still sending the request but will wait for + the 100 header once done with the request */ + EXP100_FAILED /* used on 417 Expectation Failed */ +}; + /* * Request specific data in the easy handle (SessionHandle). Previously, * these members were on the connectdata struct but since a conn struct may @@ -721,12 +729,8 @@ struct SingleRequest { int httpcode; /* error code from the 'HTTP/1.? XXX' line */ int httpversion; /* the HTTP version*10 */ struct timeval start100; /* time stamp to wait for the 100 code from */ - bool write_after_100_header; /* TRUE = we enable the write after we - received a 100-continue/timeout or - FALSE = directly */ - bool wait100_after_headers; /* TRUE = after the request-headers have been - sent off properly, we go into the wait100 - state, FALSE = don't */ + enum expect100 exp100; /* expect 100 continue state */ + int content_encoding; /* What content encoding. sec 3.5, RFC2616. */ #define IDENTITY 0 /* No encoding */ |