ellzey/libevhtp — pull request #25 by ahochhaus (2011-12-29 17:31:29+00:00)
Title: Add HTTP/1.1 chunked encoding interface.

Logic based off the code in libevent's http.c:

* When supported, automatically set Transfer-Encoding: chunked
* Prefix each chunk with it's hex-encoded size.
* Terminate the chunked response with a zero sized chunk.

This code is based off of:
https://github.com/libevent/libevent/blob/master/http.c#L2549

Currently, this change only sends chunked replies for HTTP1.1 (not 1.0).
I did this to match rfc2616 which states:

"""
A server MUST NOT send transfer-codings to an HTTP/1.0 client.
"""

http://tools.ietf.org/html/rfc2616#section-3.6

If you feel that this implementation should also send the Transfer-Encoding to HTTP 1.0 clients I can make that change.

(Sorry for the duplicate pull requests -- I'm still learning how to use github)