240 Commits

Author SHA1 Message Date
Nick Mathewson
b85b710cf5 Update copyright statements to reflect the facts that:
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
   disclaim some rights is sheer cargo-cultism.

svn:r1065
2009-01-27 22:34:36 +00:00
Nick Mathewson
8889a77039 Replace all use of config.h with event-config.h.
svn:r1064
2009-01-27 22:30:46 +00:00
Nick Mathewson
9993137cbb Remove all trailing whitespace in all the source files.
svn:r1063
2009-01-27 21:10:31 +00:00
Niels Provos
3065389973 make it so that test_persistent_timeout can call loopexit only once; reported by Alexander Drozdov
svn:r1062
2009-01-27 16:35:28 +00:00
Nick Mathewson
f20902a290 Remove evperiodic_assign and its related parts: its functionality is subsumed by EV_PERSIST timeouts.
svn:r1040
2009-01-22 17:56:15 +00:00
Nick Mathewson
dc1526e0da Fix warnings on compile: make static functions static.
svn:r1037
2009-01-22 17:48:16 +00:00
Niels Provos
fe72c885d9 fix signal processing for non-kqueue backends; when a signal callback delivers a signal; from Alexander Drozdov
svn:r1035
2009-01-22 06:23:14 +00:00
Niels Provos
a077fb8c09 rename sys/signal.h to signal.h; configure m4 macro dir; this assist with compilation on Haiku
svn:r1033
2009-01-22 02:47:35 +00:00
Niels Provos
56ea4687a5 Change the semantics of timeouts in conjunction with EV_PERSIST; timeouts in that case will now repeat until deleted.
svn:r1032
2009-01-22 02:33:38 +00:00
Nick Mathewson
309fc7c4ad New functions to provide sane threading callbacks with pthreads and win32 threading implementations.
svn:r1031
2009-01-21 07:51:25 +00:00
Nick Mathewson
9935d5b01e Fix win32 compilation. Surprisingly, unit tests pass too.
svn:r1002
2009-01-13 21:39:32 +00:00
Nick Mathewson
169321c9e6 Rename four internal headers to follow the -internal.h convention.
svn:r1000
2009-01-13 20:26:37 +00:00
Nick Mathewson
980bcd68f7 Work better with platforms that do not have ipv6 structures, or that do not have sin_len fields, etc.
svn:r986
2009-01-02 21:21:58 +00:00
Nick Mathewson
cfbd168008 Add another function to parse the common address:port combination formats into a sockaddr.
svn:r984
2009-01-02 20:46:26 +00:00
Nick Mathewson
0d9d5cfe22 New functions in evutil to clone inet_pton and inet_ntop, with tests.
Adapted from Tor code.

svn:r983
2009-01-02 20:46:12 +00:00
Niels Provos
87be18daa1 implement evdns_cancel_request; test one of the new evdns_base functions
svn:r980
2008-12-25 16:25:37 +00:00
Niels Provos
eed234519c forgot to re-enable dns tests
svn:r978
2008-12-25 16:20:45 +00:00
Niels Provos
d776f8462b deprecate the usage of signal_{add,del,set} and name it evsignal_{add,del,set} instead; move the old definitions to compat
svn:r973
2008-12-23 22:23:37 +00:00
Niels Provos
02b2b4d1be Restructure the event backends so that they do not need to keep track of events themselves, as a side effect multiple events can use the same fd or signal.
svn:r972
2008-12-23 16:37:01 +00:00
Niels Provos
ebcf5efcfe fix memory leaks in the regression tools; add another close detection test that validates that there are no dangling connections on the server
svn:r969
2008-12-19 22:42:51 +00:00
Nick Mathewson
dd73168556 Implement increased DSN-poisoning resistance via the 0x20 hack.
svn:r958
2008-12-03 20:09:13 +00:00
Niels Provos
ffb3966ec2 minor compilation and regresson fixes; from Frank Denis
svn:r952
2008-11-27 19:34:07 +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
3b24f4eedc another fix; we also need to remove the signal event from the queue
svn:r918
2008-07-25 00:48:30 +00:00
Niels Provos
a4e2f52a44 add a signal and free the base for reinit test
svn:r915
2008-07-20 23:31:28 +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
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
ac0c7e2c7d skip connection-retry test on windows
svn:r869
2008-06-25 00:58:08 +00:00
Niels Provos
f80f90ed8b fix a bug in http_connect for windows; the address was not copied correctly.
svn:r863
2008-06-24 21:01:44 +00:00
Niels Provos
2f8708db3f ifdef out a whole bunch of sections; gettimeofday to evutil_gettimeofday
svn:r862
2008-06-24 18:04:41 +00:00
Niels Provos
994a7c50e1 close -> EVUTIL_CLOSESOCKET()
gettimeofday -> evutil_gettimeofday()

svn:r861
2008-06-24 16:39:45 +00:00
Niels Provos
e736991aea make it work with older versions of automake; from Scott Lamb
svn:r858
2008-06-22 16:00:48 +00:00
Niels Provos
99a1063e73 support 64-bit integers in rpc structs
svn:r856
2008-06-21 02:21:25 +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
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
Niels Provos
9586a1cbb0 fix an evbuffer corruption when adding an empty evbuffer; from Scott Lamb
svn:r845
2008-06-01 16:21:24 +00:00
Nick Mathewson
9515c8076e Oops; add regress_et.c
svn:r841
2008-05-30 17:35:20 +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
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
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
89a1512a74 close -> EVUTIL_CLOSESOCKET
svn:r832
2008-05-15 06:33:23 +00:00
Niels Provos
c3c11f27b0 add a simple http server for potential benchmarking
svn:r823
2008-05-15 01:54:20 +00:00
Nick Mathewson
7be8f13b95 r19736@catbus: nickm | 2008-05-14 11:50:49 -0400
Add casts to make some printf formats in regress.c happier.


svn:r821
2008-05-14 15:56:17 +00:00
Nick Mathewson
0cafdeb6f5 Tweaks to make unit tests fail less badly on mingw on trunk.
svn:r814
2008-05-12 17:16:47 +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