diff options
Diffstat (limited to 'lib/http_chunks.h')
-rw-r--r-- | lib/http_chunks.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/http_chunks.h b/lib/http_chunks.h index c5b7fdf43..211818ab7 100644 --- a/lib/http_chunks.h +++ b/lib/http_chunks.h @@ -52,8 +52,8 @@ typedef enum { /* POSTCR should get a CR and nothing else, then move to POSTLF */ CHUNK_POSTCR, - /* POSTLF should get a LF and nothing else, then move back to HEX as - the CRLF combination marks the end of a chunk */ + /* POSTLF should get a LF and nothing else, then move back to HEX as the + CRLF combination marks the end of a chunk */ CHUNK_POSTLF, /* This is mainly used to really mark that we're out of the game. @@ -62,7 +62,22 @@ typedef enum { buffer! */ CHUNK_STOP, + /* At this point optional trailer headers can be found, unless the next line + is CRLF */ + CHUNK_TRAILER, + + /* A trailer CR has been found - next state is CHUNK_TRAILER_POSTCR. + Next char must be a LF */ + CHUNK_TRAILER_CR, + + /* A trailer LF must be found now, otherwise CHUNKE_BAD_CHUNK will be + signalled If this is an empty trailer CHUNKE_STOP will be signalled. + Otherwise the trailer will be broadcasted via Curl_client_write() and the + next state will be CHUNK_TRAILER */ + CHUNK_TRAILER_POSTCR, + CHUNK_LAST /* never use */ + } ChunkyState; typedef enum { @@ -74,6 +89,7 @@ typedef enum { CHUNKE_WRITE_ERROR, CHUNKE_STATE_ERROR, CHUNKE_BAD_ENCODING, + CHUNKE_OUT_OF_MEMORY, CHUNKE_LAST } CHUNKcode; |