-
evhttp: properly handle response bodies.
* Allow the user to set the Content-Length: then stream a reply.
This is useful for large requests of a known size. Added unit test.
* Don't send a response body on HEAD requests, 1xx status codes, 204
status codes, or 304 status codes, as described in RFC 2616 section
4.3. (Doing otherwise causes problems - in particular, if a 304 has a...
2008-06-28 17:09:31 UTC in libevent - an asynchronous event library
-
Thanks. I'd be happy to comment/rework any section you find particularly unclear.
2008-06-25 18:25:46 UTC in libevent - an asynchronous event library
-
Ping? Patch is ready for review, and I have others queued up behind it.
2008-06-21 06:51:38 UTC in libevent - an asynchronous event library
-
Attached patch fixes this failure with automake 1.6.3:
test/Makefile.am:20: regress_SOURCES was already defined in condition
TRUE, which implies condition PTHREAD_REGRESS_TRUE
...
test/Makefile.am:20: regress_SOURCES was already defined in condition
TRUE, which implies condition ZLIB_REGRESS_TRUE
...
test/Makefile.am:20: warning: automake does not support...
2008-06-21 06:50:53 UTC in libevent - an asynchronous event library
-
File Added: 0001-Fix-outbound-keepalives.patch.
2008-06-15 05:09:18 UTC in libevent - an asynchronous event library
-
An additional related bug - EVHTTP_CON_GOTHEADERS was not getting reset, so an EOF during the read of the headers of subsequent requests was considered okay. Hmm, with my new code, an EOF while reading trailers would also be considered okay then, which is not desirable. Tracking EVHTTP_CON_GOTHEADERS separately from the callback is confusing anyway when things break. I think I'll switch this to...
2008-06-14 17:53:13 UTC in libevent - an asynchronous event library
-
Okay, I've got it. I wrote a simple test program to narrow this down (attached):
$ ./keepalive_test www.slamb.org / # makes a non-chunked request
$ ./keepalive_test www.mixographer.com / # makes a chunked request
The diff chunk in my first comment is necessary for any keepalive request following one in which the entire body did not come in the same read as the header. (Not...
2008-06-14 17:07:20 UTC in libevent - an asynchronous event library
-
Hmm. While I'm fairly confident the changes in my patch are correct, they don't seem sufficient in my actual application. It appears that evhttp_read_cb is getting called where evhttp_read_header_cb should be called on the second request. I'm not sure why this is happening or why it doesn't occur in my unit test; I'll take a closer look tomorrow.
This additional http.c patch seems to fix it:
2008-06-14 07:48:30 UTC in libevent - an asynchronous event library
-
Any outbound request following a chunked keepalive response will fail. The attached patch tests and fixes this scenario.
Applies to trunk revision 846.
2008-06-14 06:56:24 UTC in libevent - an asynchronous event library
-
A polished and updated version of a patch I sent to the mailing list a while back. This patch makes evhttp_request_set_chunked_cb much more useful - it's called on non-chunked responses, you can cancel the request from within it, and it's unit tested. This support is important for a proxy I'm working on.
Applies to trunk HEAD (revision 836).
I'll follow up with a flow control patch once...
2008-05-27 06:50:12 UTC in libevent - an asynchronous event library