aboutsummaryrefslogtreecommitdiff
path: root/lib/http_chunks.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-03-07 23:51:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-03-07 23:51:41 +0000
commita23db7b7c7a183cbab8eadc59d73aaa159d301de (patch)
treef3dd38fd456ab22ddc614d92fcde1f00bd2ff127 /lib/http_chunks.h
parentf6b6dff46a213f2533b9af4e531466d214546a5b (diff)
"Transfer-Encoding: chunked" support added
Diffstat (limited to 'lib/http_chunks.h')
-rw-r--r--lib/http_chunks.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/http_chunks.h b/lib/http_chunks.h
index 5869b9173..6f7716e43 100644
--- a/lib/http_chunks.h
+++ b/lib/http_chunks.h
@@ -49,15 +49,19 @@ typedef enum {
HEX state. */
CHUNK_DATA,
- /* This is only used to really mark that we're out of the game */
+ /* This is mainly used to really mark that we're out of the game.
+ NOTE: that there's a 'dataleft' field in the struct that will tell how
+ many bytes that were not passed to the client in the end of the last
+ buffer! */
CHUNK_STOP,
CHUNK_LAST /* never use */
} ChunkyState;
typedef enum {
- CHUNKE_OK,
- CHUNKE_TOO_LONG_HEX,
+ CHUNKE_STOP = -1,
+ CHUNKE_OK = 0,
+ CHUNKE_TOO_LONG_HEX = 1,
CHUNKE_WRITE_ERROR,
CHUNKE_STATE_ERROR,
CHUNKE_LAST
@@ -67,7 +71,8 @@ struct Curl_chunker {
char hexbuffer[ MAXNUM_SIZE + 1];
int hexindex;
ChunkyState state;
- unsigned long datasize;
+ size_t datasize;
+ size_t dataleft; /* untouched data amount at the end of the last buffer */
};
#endif