"Transfer-Encoding: chunked" support added

This commit is contained in:
Daniel Stenberg 2001-03-07 23:51:41 +00:00
parent f6b6dff46a
commit a23db7b7c7
6 changed files with 61 additions and 17 deletions

View file

@ -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