diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2011-09-19 17:29:09 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2011-11-09 20:10:03 +0100 |
commit | cfaeccb1e8a62ef0a5f7af7d3496a3bfc5ca381e (patch) | |
tree | 89004114da0b676742b7d2730d9feedea87a3b5d /src/libwaitress/waitress.h | |
parent | ffb0ab45fb142fbad732562b787918ba503f0643 (diff) | |
download | pianobar-windows-cfaeccb1e8a62ef0a5f7af7d3496a3bfc5ca381e.tar.gz pianobar-windows-cfaeccb1e8a62ef0a5f7af7d3496a3bfc5ca381e.tar.bz2 pianobar-windows-cfaeccb1e8a62ef0a5f7af7d3496a3bfc5ca381e.zip |
waitress: support chunked encoding
as requested by rfc 2616
Diffstat (limited to 'src/libwaitress/waitress.h')
-rw-r--r-- | src/libwaitress/waitress.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libwaitress/waitress.h b/src/libwaitress/waitress.h index 67c12d6..f3aff55 100644 --- a/src/libwaitress/waitress.h +++ b/src/libwaitress/waitress.h @@ -48,18 +48,24 @@ typedef struct { const char *path; /* without leading '/' */ } WaitressUrl_t; +/* reusable handle + */ typedef struct { WaitressUrl_t url; WaitressMethod_t method; const char *extraHeaders; const char *postData; - size_t contentLength; - size_t contentReceived; WaitressUrl_t proxy; /* extra data handed over to callback function */ void *data; WaitressCbReturn_t (*callback) (void *, size_t, void *); int socktimeout; + /* per-request data */ + struct { + size_t contentLength, contentReceived, chunkSize; + /* first argument is WaitressHandle_t, but that's not defined here */ + WaitressCbReturn_t (*dataHandler) (void *, char *, size_t); + } request; } WaitressHandle_t; typedef enum { |