diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2013-06-16 13:15:15 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2013-06-16 13:15:15 +0100 |
commit | ab19567e25a35beb23f922303d1f60ed13228356 (patch) | |
tree | 8a29cfdea7ba920861c13fe98242e449615f8bbc /lib/http_client.h | |
parent | 41a94dd69dcbb5d4ef1fda5949196fed63994c03 (diff) | |
parent | dd7b931d0fe950c5a6646c72565739fd8835c136 (diff) |
Merging HTTP/1.1 branch. This implements HTTP/1.1 support in http_client.
Little benefit as I'm not burning my fingers on keepalive connecitons for
now, but eventually the Twitter streaming API is going to drop 1.0 support:
https://dev.twitter.com/blog/deprecating-http-1.0-streaming-api
Diffstat (limited to 'lib/http_client.h')
-rw-r--r-- | lib/http_client.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/http_client.h b/lib/http_client.h index ca427118..1b86f228 100644 --- a/lib/http_client.h +++ b/lib/http_client.h @@ -41,6 +41,7 @@ typedef enum http_client_flags { HTTPC_STREAMING = 1, HTTPC_EOF = 2, + HTTPC_CHUNKED = 4, /* Let's reserve 0x1000000+ for lib users. */ } http_client_flags_t; @@ -76,10 +77,15 @@ struct http_request int inpa; int bytes_written; int bytes_read; + int content_length; /* "Content-Length:" header or -1 */ /* Used in streaming mode. Caller should read from reply_body. */ char *sbuf; size_t sblen; + + /* Chunked encoding only. Raw chunked stream is decoded from here. */ + char *cbuf; + size_t cblen; }; /* The _url variant is probably more useful than the raw version. The raw |