224 Commits

Author SHA1 Message Date
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
Niels Provos
950af18679 replace fnmatch with homegrown function
svn:r804
2008-05-10 05:58:17 +00:00
Nick Mathewson
8acb80b4f9 r15551@tombo: nickm | 2008-05-08 14:49:20 -0400
Use _get_ convention for new accessor functions.  (These are all new ones as of 2.0, I believe).


svn:r799
2008-05-08 22:51:39 +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
f2d65f8a9c r19634@catbus: nickm | 2008-05-07 16:10:37 -0400
the C syntax is fn(void), not fn().


svn:r784
2008-05-07 20:29:33 +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
Niels Provos
300a4efb2d test virtual hosts
svn:r780
2008-05-07 01:52:24 +00:00
Nick Mathewson
caa368e1cc 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.


svn:r779
2008-05-05 19:19:47 +00:00
Nick Mathewson
4e8a339ef7 r19602@catbus: nickm | 2008-05-05 11:45:18 -0400
Make most of the tests use the new headers.


svn:r776
2008-05-05 15:46:00 +00:00
Niels Provos
f940eb4b8d fix a bug where it was not possible to bind multiple sockets to the same http
server; test that binding multiple sockets works.


svn:r769
2008-05-04 22:21:29 +00:00
Niels Provos
1d30750b1d support for periodic timeouts
svn:r762
2008-05-03 22:10:09 +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
Niels Provos
e8f450f232 expose a way to create the rpc context manually
svn:r754
2008-05-01 02:08:26 +00:00
Niels Provos
d76cca7273 fix missing printf format argument
svn:r752
2008-04-30 04:36:26 +00:00