From Scott Lamb:
* 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
chunked body (even an empty one), Safari 3.1.1 issues and then fails
the next request on the connection with the non-sequitur error message
"Too many HTTP redirects"!)
* Specify a default Content-Type: when a response body is required, not
when we have data in the response buffer by the time we make the
header. (I.e., do this on evhttp_send_reply_start() for consistency.)
* Don't expect a body in response to HEAD requests.
Nick Mathewson [Sat, 14 Jun 2008 17:50:36 +0000 (17:50 +0000)]
Forward-port: Rename INPUT and OUTPUT to EVRPC_INPUT and EVRPC_OUTPUT, but keep the INPUT/OUTPUT aliases on non-win32 platforms to maintain backwards compatibility.
Niels Provos [Mon, 2 Jun 2008 05:45:26 +0000 (05:45 +0000)]
deliver partial data to request callbacks when chunked callback is set even if there is no chunking on the http level; allows cancelation of requests from within the chunked callback; from Scott Lamb.
Nick Mathewson [Fri, 30 May 2008 16:56:34 +0000 (16:56 +0000)]
Patch from Valery Kholodkov: support for edge-triggered events with epoll and kqueue. Changed from original patch: made test into a regression test, with explicit success/failure for edge-triggered and non-edge-triggered cases. Closes SF request 1968284.
Niels Provos [Thu, 29 May 2008 01:39:43 +0000 (01:39 +0000)]
simplify handling of environment variables for disabling backends;
make event_get_supported_methods obey environment variables; this
fixes make verify; problem reported by Scott Lamb.
Niels Provos [Thu, 15 May 2008 06:36:36 +0000 (06:36 +0000)]
Attempt to make a project for the regression test. There are several problems:
- no gettimeofday on windows
- no varargs macros on windows (all the rpc stuff does not build)
- no zlib on windows (zlib test does not build)
- some library dependencies seem to be missing
Nick Mathewson [Mon, 12 May 2008 00:40:04 +0000 (00:40 +0000)]
r19675@catbus: nickm | 2008-05-11 20:39:39 -0400
Stop pretending that u_char and u_short are standard types that win32 is dumb not to have. In fact, u_char can really just be spelled out, and u_short was usually just a bad way of saying ev_uint16_t.
Nick Mathewson [Thu, 8 May 2008 15:55:09 +0000 (15:55 +0000)]
r15549@tombo: nickm | 2008-05-08 11:53:11 -0400
Make new http headers include minimal parts of event2/ tree; make old evhttp.h incldue event.h, since the old one did too.
Nick Mathewson [Thu, 8 May 2008 14:06:33 +0000 (14:06 +0000)]
r19649@catbus: nickm | 2008-05-08 10:00:14 -0400
Replace gettimeofday() usage with a new evutil_gettimeofday(). This removes all previous need for win32-code/misc.[ch]
Nick Mathewson [Mon, 5 May 2008 19:19:47 +0000 (19:19 +0000)]
r19610@catbus: nickm | 2008-05-05 15:18:52 -0400
Switch strcmp() tests in test_evbuffer() to use memcmp instead. Previously they broke on my Linux box.
Nick Mathewson [Mon, 5 May 2008 19:19:08 +0000 (19:19 +0000)]
r19609@catbus: nickm | 2008-05-05 15:16:52 -0400
Reename evdns-internal struct request to evdns_request, and expose the name. switch new evdns resolve APIs to return evdns_request*. This is a prereq to making evdns requests cancelable.
Nick Mathewson [Mon, 5 May 2008 15:45:30 +0000 (15:45 +0000)]
r19599@catbus: nickm | 2008-05-05 11:26:18 -0400
Turn event_initialized() and friends into a function; add function equivalents for EVENT_FD and EVENT_SIGNAL.
Nick Mathewson [Mon, 5 May 2008 15:00:53 +0000 (15:00 +0000)]
r19597@catbus: nickm | 2008-05-05 11:00:29 -0400
define _GNU_SOURCE before including fnmatch.h so that FNM_CASEFOLD gets defined and linux build gets fixed. This whole fnmatch() business will be a bit hard to port, though: windows doesn't have one IIUC, so we'll have to reimplement our own to work there.