From cfaeccb1e8a62ef0a5f7af7d3496a3bfc5ca381e Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 19 Sep 2011 17:29:09 +0200 Subject: waitress: support chunked encoding as requested by rfc 2616 --- src/libwaitress/waitress.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/libwaitress/waitress.h') 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 { -- cgit v1.2.3