172 Commits

Author SHA1 Message Date
Niels Provos
a710d817ad Match the query in DNS replies to the query in the request; from Vsevolod Stakhov
svn:r930
2008-08-30 23:19:49 +00:00
Niels Provos
c968eb3e01 Fix a bug where headers arriving in multiple packets were not parsed; fix from Jiang Hong; test by me.
svn:r928
2008-08-19 11:26:47 +00:00
Niels Provos
cca2f8fa0e make event_add not change any state if it fails; repoted by Ian Bell
svn:r923
2008-07-25 01:29:54 +00:00
Niels Provos
1aa6826f62 fix off by one errors in devpoll; from Ian Bell
svn:r921
2008-07-25 01:18:40 +00:00
Niels Provos
e67a5ea9bb fix a problem with epoll and event_reinit; reported by Alexander Drozdov
svn:r917
2008-07-25 00:19:15 +00:00
Niels Provos
c4af6211bd forgot to add Alexander Drozdov as bug reporter in ChangeLog
svn:r905
2008-07-11 16:11:16 +00:00
Niels Provos
f7e61870e9 support multiple events listening on the same signal; make signals regular events that go on the same event queue
svn:r901
2008-07-11 15:49:04 +00:00
Niels Provos
5512be0176 fix a bug where deleting signals with kqueue would delete subsequent adds
svn:r899
2008-07-11 15:15:04 +00:00
Niels Provos
df97fca9ca 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.



svn:r898
2008-07-02 06:08:16 +00:00
Niels Provos
409236a77d detect CLOCK_MONOTONIC at runtime for evdns
svn:r896
2008-07-02 04:39:09 +00:00
Niels Provos
707f67849a reject negative content-length headers
svn:r894
2008-07-02 04:22:48 +00:00
Niels Provos
cb7c3bd671 support multi-line http headers; based on a patch from Moshe Litvin
svn:r890
2008-06-29 01:30:06 +00:00
Niels Provos
9998c0cbc8 correct handling of trailing headers in chunked replies; from Scott Lamb.
svn:r887
2008-06-26 00:40:57 +00:00
Niels Provos
99a1063e73 support 64-bit integers in rpc structs
svn:r856
2008-06-21 02:21:25 +00:00
Niels Provos
4c56ba1ced do not use SO_REUSEADDR when connecting
svn:r854
2008-06-20 06:52:13 +00:00
Nick Mathewson
2baaac7fdb 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.
svn:r852
2008-06-14 17:50:36 +00:00
Niels Provos
a6ce520cfb allow min_heap_erase to be called on removed members; from liusifan
svn:r849
2008-06-12 14:43:35 +00:00
Niels Provos
344c2b56f1 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.
svn:r846
2008-06-02 05:45:26 +00:00
Nick Mathewson
05965921ab Add new functions to access backends by their features and to query the features of a backend.
svn:r842
2008-05-31 14:37:31 +00:00
Nick Mathewson
39400e68b6 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.
svn:r840
2008-05-30 16:56:34 +00:00
Nick Mathewson
9ca7a3a3d6 Resolve two conflicts.
svn:r839
2008-05-30 16:19:01 +00:00
Niels Provos
2deb3ce061 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.


svn:r838
2008-05-29 01:39:43 +00:00
Niels Provos
8b66f1bd4d constify struct timeval *
svn:r836
2008-05-17 02:14:17 +00:00
Niels Provos
134344b79e Fix use of freed memory in event_reinit; pointed out by Peter Postma
svn:r834
2008-05-16 01:55:40 +00:00
Niels Provos
ec3956ba48 fix connection keep-alive behavior for HTTP/1.0
svn:r822
2008-05-15 01:53:48 +00:00
Nick Mathewson
c6da86ffcb r19709@catbus: nickm | 2008-05-12 12:42:48 -0400
Possible fix for [1960723] snprintf and vsnprintf return values are wrong on win32


svn:r813
2008-05-12 16:44:24 +00:00
Niels Provos
1080852e91 allow cancelation of user initiated http requests; this will allow cancelation of rpc requests eventually
svn:r812
2008-05-12 03:12:09 +00:00
Nick Mathewson
64ce799083 r15555@tombo: nickm | 2008-05-08 19:56:51 -0400
fwd-port The IRIX compiler thinks #error means warn.  Fix configure.in to tolerate this.


svn:r801
2008-05-08 23:57:31 +00:00
Nick Mathewson
a26442c5ac 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]


svn:r792
2008-05-08 14:06:33 +00:00
Niels Provos
85ed713343 deprecate timeout_* event functions by moving them to event_compat.h
svn:r791
2008-05-08 07:00:16 +00:00
Niels Provos
de1c43926b migrate evhttp to event2; accessors are still missing
svn:r790
2008-05-08 06:15:04 +00:00
Niels Provos
3f56e364b7 event_base_new_with_config() and related methods
svn:r789
2008-05-08 05:56:20 +00:00
Niels Provos
3b2022ef3a provide an api for retrieving the supported event mechanisms
svn:r788
2008-05-08 05:33:15 +00:00
Nick Mathewson
68fecb7ab6 r19633@catbus: nickm | 2008-05-07 16:10:00 -0400
Fix bug 1958901: stop overriding CPPFLAGS in test directory.


svn:r783
2008-05-07 20:29:11 +00:00
Nick Mathewson
d0c3644e63 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.


svn:r773
2008-05-05 15:45:30 +00:00
Niels Provos
f2a81fbc67 add support for virtual http hosts; no tests yet
svn:r771
2008-05-05 07:17:05 +00:00
Niels Provos
1d30750b1d support for periodic timeouts
svn:r762
2008-05-03 22:10:09 +00:00
Niels Provos
8c750eaff8 separate signal events from io events
svn:r760
2008-05-03 21:37:33 +00:00
Niels Provos
45e6fb0dd2 cache clock_gettime/gettimeofday values in base
svn:r758
2008-05-03 18:23:44 +00:00
Niels Provos
f04497e493 introduce evbuffer_reserve_space() and evbuffer_commit_space() to make processing in filters more efficient
svn:r757
2008-05-03 03:05:28 +00:00
Niels Provos
becc89b778 introduce evbuffer_contiguous_space() and use it in the zlib filter test
svn:r756
2008-05-03 02:37:18 +00:00
Nick Mathewson
5fbc7f0aee r15439@tombo: nickm | 2008-05-02 12:28:08 -0400
use event_assign internall; switch uses of event_set to use event_assign instead.


svn:r755
2008-05-02 16:28:25 +00:00
Niels Provos
85c4904bc5 allow connections to be removed from an rpc pool
svn:r753
2008-05-01 01:45:00 +00:00
Niels Provos
682adc443b support input/output filters for bufferevents
svn:r748
2008-04-30 00:09:16 +00:00
Nick Mathewson
98dc98c59f r15346@tombo: nickm | 2008-04-29 17:19:18 -0400
Remove the never-exported, never-used, never-threadsafe evhttp_hostportfile()


svn:r746
2008-04-29 21:19:26 +00:00
Nick Mathewson
9626a421de r15341@tombo: nickm | 2008-04-29 14:09:50 -0400
Use internal implementation for evutil_timercmp() everywhere, to avoid bugs when the platform timercmp() has never heard of <= or >=.  Also, replace timercmp() usage in min_heap.c with call to evutil_timercmp().


svn:r744
2008-04-29 18:11:23 +00:00
Niels Provos
e44ef375ee convert evhttp_connection to use bufferevents
svn:r742
2008-04-29 04:52:50 +00:00
Niels Provos
9485ff9a66 introduce bufferevent_setcb and bufferevent_setfd to allow better manipulation of bufferevents
svn:r737
2008-04-27 20:40:56 +00:00
Niels Provos
dd183f7c97 provide bufferevent_input and bufferevent_output without requiring knowledge of the structure
svn:r734
2008-04-27 00:32:10 +00:00
Niels Provos
f6c4017381 fix a bug in which bufferevent_write_buffer would not schedule a write event
svn:r733
2008-04-26 05:13:56 +00:00