Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| 73bf07fe | 2010-10-26 21:33:13 | Merge remote branch 'github/20_abi_breaks' | ||
| a4063c06 | 2010-10-26 10:38:30 | Note that 2.0.9 will break the ABI, and make changes we were postponing. We had to turn a couple of 32-bit size arguments into 64-bit arguments or size_t arguments (since otherwise we would have had to do it post 2.0.x-stable, and that would be worse). | ||
| 2cbb1a16 | 2010-10-26 10:27:29 | Make rate-limits go up to SIZE_MAX/EV_SSIZE_MAX, not just INT32_MAX Someday, when networks are far faster and people frequently want a burst value greater than 2GB per tick, this will seem very forsightful indeed. For now, it breaks ABI, but not source. Fixes bug 3092096. | ||
| 9c71a341 | 2010-10-25 15:13:32 | Merge remote branch 'github/http_and_listener' | ||
| ac7e52d8 | 2010-10-25 14:29:30 | Make evbuffer_add_file take ev_off_t, not off_t This change has no effect on non-windows platforms, since those either define off_t to 64-bits, or allow you to decide whether it should be 64-bits yourself via some LARGEFILE-like macro. On Windows, however, off_t is always 32-bit, so it's a bad choice for "file size" or "file offset" values. Instead, I'm adding an ev_off_t type, and using it in the one place where we used off_t to mean "the size of a file" or "an offset into a file" in the API. This breaks ABI compatibility on Windows. | ||
| 006efa7d | 2010-10-25 11:50:51 | Functions to actually use evhttp_bound_socket with/as evconnlistener. | ||
| 46ee061c | 2010-10-25 11:47:05 | Add a function to change a listener's callback. You can also now initialize listeners with no callbacks set; if so, they won't get enabled until the callback is set to non-NULL. | ||
| bf11e7dd | 2010-10-21 15:33:13 | Merge branch 'http_uri_parse' | ||
| 45f6869c | 2010-10-21 14:41:12 | Make evhttp_uri non-public, and give it accessor functions. | ||
| 70e1b607 | 2010-10-21 14:05:04 | Document that two bufferevent functions only work on socket bufferevents | ||
| aab49b60 | 2010-10-21 14:04:24 | Add a bufferevent_get_base function | ||
| cd00079b | 2010-10-21 12:19:28 | Add evhttp_connection_get_base() to get the event_base from an http connection Based on a patch by Mark Ellzey from 27 July 2010. Closes ticket 3052406 | ||
| 2075fbcf | 2010-10-19 13:15:48 | Add evhttp_parse_query_str to be used with evhttp_uri_parse. The old evhttp_parse_query() doesn't work well with struct evhttp_uri.query, since it expects to get whole URIs, rather than just the query portion. | ||
| 3a334628 | 2010-10-19 13:02:18 | Document behavior of URI parsing more thoroughly. Also, move evhttp_uri struct into http.h, since it is part of the API. | ||
| eaa5f1d9 | 2010-10-19 11:26:59 | Revise evhttp_uri_parse implementation to handle more of RFC3986 | ||
| 7d45431e | 2010-10-18 14:38:48 | Do not silently truncate URIs in evhttp_uri_join. Also avoid evbuffer_pullup. | ||
| 86dd720a | 2010-08-08 16:46:39 | Introduce absolute URI parsing helpers. See evhttp_uri_parse(), evhttp_uri_free() and evhttp_uri_join() for details. | ||
| f13e449b | 2010-10-18 14:20:06 | Merge branch 'http_parse' | ||
| 49f4bf7c | 2010-10-18 13:58:02 | Add evhttp_request_get_command so code can tell GET from POST without peeking at the struct. | ||
| a8148ced | 2010-10-08 13:05:13 | New evhttp_uri(encode|decode) functions to handle + and NUL characters right The old evhttp_decode_uri() function would act as tough it was doing an (illegal, undefined) decode operation on a whole URL at once, and treat + characters following a ? as different from + characters preceding one. But that's not useful: If you are decoding a URI before splitting off query parameters, you are begging to fail as soon as somebody gives you a value with an encoded & in it. The new evhttp_uridecode() function takes an argument that says whether to decode + signs. Both uridecode and uriencode also now support encoding or decoding to strings with internal 0-valued characters. | ||
| 2e63a604 | 2010-10-08 12:57:11 | evhttp_encode_uri encodes all reserved characters, including !$'()*+,/:=@ Perviously, some characters not listed as "unreserved" by RFC 3986 (notably "!$'()*+,/:=@") were not encoded by evhttp_encode_uri. This made trouble, especially when encoding path components (where @ and / are bad news) and parameters (where + should get encoded so it doesn't later decode into a space). Spotted by Bas Verhoeven. | ||
| 127d4f21 | 2010-09-23 16:49:58 | Add a LEV_OPT_THREADSAFE option for threadsafe evconnlisteners | ||
| 3b844893 | 2010-10-06 12:35:38 | Tweak evhttp_parse_query hack to avoid breaking abi | ||
| b1756d01 | 2010-10-06 11:48:52 | Let evhttp_parse_query return -1 on failure We already detected certain malformed queries, but we responded by aborting the query-parsing process half-way through without telling the user. Now, if query-parsing fails, no headers are returned, and evhttp_parse_query returns -1. | ||
| c4be8d82 | 2010-09-20 12:47:39 | Add error callback to evconnlistener | ||
| 2447fe88 | 2010-08-28 04:07:48 | Add event_config_set_num_cpus_hint for tuning thread pools, etc. | ||
| 42090072 | 2010-09-06 15:47:07 | Move the "function to getsockname() on a listener" to regress_testutils This reverts commit fab50488fcb741884ccdfa7b83643eac3e5c9cbf. The function was, on reflection, not important enough to break the feature freeze, since it's trivial to build on your own. | ||
| c51826ff | 2010-09-06 15:40:13 | Merge remote branch 'github/sysqueue_include_order' | ||
| 19521436 | 2010-09-03 16:42:16 | Expose a function to add a nameserver by sockaddr | ||
| fab50488 | 2010-09-03 16:41:16 | Expose a function to getsockname() on a listener's fd. | ||
| ca9048f1 | 2010-09-02 11:36:44 | Move evkeyvalq into a separate header for evhttp_parse_query users The evhttp_parse_query API is a bit misdesigned; all the other evkeyvalq stuff is abstract and lets you get away with having a header stub, but evhttp_parse_query seems to require that you instantiate an empty evkeyvalq of your own. | ||
| d3ceca80 | 2010-09-02 11:27:57 | Declare evkeyvalq and event_list even if event_struct.h comes before sys/queue.h Fixes bug 3036645 reported by Mihai Draghicioiu | ||
| d4977b52 | 2010-08-17 13:15:34 | Add a condition variable backend, with implementations for pthreads and win32 The interface from the user's POV is similar to the locking implementation: either provide a structure full of function pointers, or just call evthread_use_*_threads() and everything will be okay. The internal interface is meant to vaguely resemble pthread_cond_*, which Windows people will better recognize as *ConditionVariable*. | ||
| 60433a0a | 2010-08-13 17:08:59 | Clean up syntax on TAILQ_ENTRY() usage Though the C standards allow it, it's apparently possible to get MSVC upset by saying "struct { int field; } (declarator);" instead of "struct {int field; } declarator;", so let's just not do that. Bugfix for 3044492 (commit msg by nickm) | ||
| a4af9be1 | 2010-08-13 11:41:37 | Make include/event2/event-config.h not included in source dist As a generated file, it shouldn't get included in our source distribution. Apparently there is an automake incant for this: nobase_ even stacks with nodist_ . | ||
| 33200e72 | 2010-08-10 15:03:14 | Document that DNS_NO_SEARCH is an obsolete alias for DNS_QUERY_NO_SEARCH | ||
| 3808168d | 2010-08-10 15:02:50 | Completely remove the (mostly-removed) obsolete thread functions. | ||
| ec347b92 | 2010-07-07 16:45:03 | Move event-config.h to include/event2 This change means that all required include files are in event2, and all files not in event2/* are optional. | ||
| 6ae53d67 | 2010-08-04 15:44:08 | Add an interface to expose min_share in ratelimiting groups | ||
| cc2379d2 | 2010-07-26 14:48:32 | Constify a couple of arguments to evdns_server_request_add_*_reply | ||
| e1c1167c | 2010-07-22 14:38:08 | Replace (unused,always 0) is_tcp argument to evdns_add_server_port*() with flags Since we weren't using it for anything, and we always failed if it was set, we're allowed to change the future semantics of setting it. | ||
| 215e629c | 2010-06-21 12:26:21 | Add bufferevent_lock()/bufferevent_unlock() Although bufferevent operations are threadsafe, sometimes you need to make sure that a few operations on a single bufferevent will all be executed with nothing intervening. That's what these functions are for. | ||
| 7b259b67 | 2010-06-21 12:24:49 | Fix sentence fragment in docs for event_get_struct_event_size() | ||
| e21f5d15 | 2010-06-19 18:21:40 | Document a change in the semantics of event_get_struct_event_size() | ||
| 276e7ee9 | 2010-06-11 11:57:13 | Fix a pedantic gcc 4.4 warning in event2/event.h | ||
| 17a8e2d7 | 2010-06-07 12:06:43 | Add a function to retrieve the other side of a bufferevent pair | ||
| 06bd0563 | 2010-05-26 12:50:59 | Fix the default HTTP error template The current template... <HTML><HEAD><TITLE>%s</TITLE> </HEAD><BODY> <H1>Method Not Implemented</H1> Invalid method in request<P> </BODY></HTML> is highly confusing. The given title is easily overlooked and the hard-coded content is just plain wrong in most cases (I really read this as "the server did not understand the requested HTTP method) This patch changes the template to include the error reason in the body as well as in the header, and to infer the proper reason from the status code whenever the reason argument is NULL. This patch also removes a redundant evhttp_add_header from evhttp_send_error; evhttp_send_page already adds a "Connection: close" header. | ||
| fdfc3fc5 | 2010-05-13 11:23:12 | Remove the now-unusable EVTHREAD_LOCK/UNLOCK constants | ||
| 7c519dfd | 2010-05-08 23:29:29 | Fix some autoconf issues on OpenBSD Issue 1: autoconf gets accept when a header works properly with cpp but not with cc. This was true of the sys/sysctl.h header on openbsd. The fix: include sys/param.h (if present) when testing for sys/sysctl.h Issue 2: Somehow, autoconf's macro generation code is messed up on some versions of openbsd (including mine, and other people's too) so that instead of SIZEOF_VOID_P, it makes SIZEOF_VOID__. evutil/util.h now works around that. | ||
| a62c8433 | 2010-05-06 14:16:50 | Merge commit 'chrisd/connect-hostname-report-err' | ||
| c16e6844 | 2010-05-04 13:27:36 | Rename current_base symbol to event_global_current_base_ The "current_base" symbol was never actually declared in an exported header; it's hideously deprecated, and it was the one remaining exported symbol (fwict) that was prefixed with neither ev nor bufferevent nor _ev nor _bufferevent. codesearch.google.com turns up no actual attempts to use our current_base from outside libevent. | ||
| a5208fe4 | 2010-04-27 13:42:26 | Release locks on bufferevents while executing callbacks This fixes a dead lock for me where bufferevents in different event loops use each other and access their input/output buffers (proxy-like scenario). | ||
| 0ef40706 | 2010-04-24 00:06:38 | Report DNS error when lookup fails during bufferevent_socket_connect_hostname. | ||
| a5bf43ab | 2010-03-04 01:14:32 | Document evutil_secure_rng_init() and evutil_secure_rng_add_bytes() | ||
| 899c1dcc | 2010-04-14 15:42:57 | Replace EVUTIL_CLOSESOCKET macro with a function The EVUTIL_CLOSESOCKET() macro required you to include unistd.h in your source for POSIX. We might as well turn it into a function: an extra function call is going to be cheap in comparison with the system call. We retain the EVUTIL_CLOSESOCKET() macro as an alias for the new evutil_closesocket() function. (commit message from email by Nick and Sebastian) | ||
| 755fbf16 | 2010-04-14 14:27:29 | Add void* arguments to request_new and reply_new evrpc hooks This makes evprc setup more extensible, and helps with Shuo Chen's work on implementing Google protocol buffers rpc on top of Libevent 2 evrpc. This patch breaks binary compatibility with previous versions of Libevent, since it changes struct evrpc and the signature of evrpc_register_generic(). Since all compliant code should be calling evrpc_register_generic via EVRPC_REGISTER, it shouldn't break source compatibility. (Code by Shuo Chen; commit message by Nick) | ||
| 07edf784 | 2010-04-14 14:23:03 | Expose the request and reply members of rpc_req_generic() This code adds two accessor functions to evprc, and helps integrate evrpc with Google protocol buffers. (Code by Shuo Chen; commit message by nickm) | ||
| eb86c8c5 | 2010-04-12 22:24:54 | Add evbuffer_copyout to copy data from an evbuffer without draining The evbuffer_remove() function copies data from the front of an evbuffer into an array of char, and removes the data from the buffer. This function behaves the same, but does not remove the data. This behavior can be handy for lots of protocols, where you want the evbuffer to accumulate data until a complete record has arrived. Lots of people have asked for a function more or less like this, and though it isn't too hard to code one from evbuffer_peek(), it is apparently annoying to do it in every app you write. The evbuffer_peek() function is significantly faster, but it requires that the user be able to handle data in separate extents. This patch also reimplements evbufer_remove() as evbuffer_copyout() followed by evbuffer_drain(). I am reasonably confident that this won't be a performance hit: the memcpy() overhead should dominate the cost of walking the list an extra time. | ||
| fb366c1d | 2010-03-21 13:16:31 | Functions to track the total bytes sent over a rate limit group. | ||
| ee41aca6 | 2010-03-12 00:46:39 | Functions to manipulate existing rate limiting groups. This patch adds a function to change the current rate limit of a rate limiting group, and another to free an empty rate limiting group. | ||
| b2f2be6e | 2010-03-10 16:25:16 | Make evdns use the regular logging system by default Once, for reasons that made sense at the time, we had evdns.c use its own logging subsystem with two levels, "warn" and "debug". This leads to problems, since setting a log handler for Libevent wouldn't actually trap these messages, since they weren't on by default, and since some of the warns should really be msgs. This patch changes the default behavior of evdns.c to log to event_(debugx,warnx,msgx) by default, and adds a new (internal-use-only) log level of EVDNS_LOG_MSG. Programs that set a evdns logging function will see no change. Programs that don't will now see evdns warnings reported like other warnings. | ||
| 17efc1cd | 2010-03-04 01:25:51 | Update all our copyright notices to say "2010" | ||
| 2fac0f70 | 2010-03-03 12:15:15 | Remove signal_assign() and signal_new() macros. These were introduced and deprecated in the same version (2.0.1-alpha), presumably in two-stage process. Everybody sane should be using evsignal_assign() and evsignal_new() instead. | ||
| d3288293 | 2010-02-20 18:44:35 | Provide consistent, tested semantics for bufferevent timeouts The different bufferevent implementations had different behavior for their timeouts. Some of them kept re-triggering the timeouts indefinitely; some disabled the event immediately the first time a timeout triggered. Some of them made the timeouts only count when the bufferevent was actively trying to read or write; some did not. The new behavior is modeled after old socket bufferevents, since they were here first and their behavior is relatively sane. Basically, each timeout disables the bufferevent's corresponding read or write operation when it fires. Timeouts are stopped whenever we suspend writing or reading, and reset whenever we unsuspend writing or reading. Calling bufferevent_enable resets a timeout, as does changing the timeout value. | ||
| 162ce8a8 | 2010-02-23 00:38:30 | Expose view of current rate limit as constrained by group limit | ||
| 4faeaea9 | 2010-02-19 03:39:50 | Clean up formatting: function/keyword spacing consistency. - Keywords always have a space before a paren. Functions never do. - No more than 3 blank lines in a row. | ||
| e5cf9879 | 2010-02-18 17:46:56 | Clean up formatting: remove trailing spaces | ||
| e5bbd40a | 2010-02-18 17:41:15 | Clean up formatting: use tabs, not 8-spaces, to indent. | ||
| 8fdf09c0 | 2010-02-18 17:08:50 | Clean up formatting: Disallow space-before-tab. | ||
| ca46d25b | 2010-02-17 23:02:28 | Merge branch 'arc4random' | ||
| 3fe60fdf | 2010-02-12 23:40:13 | Use off_t for the length parameter of evbuffer_add_file | ||
| d4de062e | 2010-02-10 17:19:18 | Add an arc4random implementation for use by evdns Previously, evdns was at the mercy of the user for providing a good entropy source; without one, it would be vulnerable to various active attacks. This patch adds a port of OpenBSD's arc4random() calls to Libevent [port by Chris Davis], and wraps it up a little bit so we can use it more safely. | ||
| 1dd7e6dc | 2010-02-05 01:16:23 | Remove the 'flags' argument from evdns_base_set_option() The 'flags' argument made sense when passed to evdns_(base_)?parse_resolv_conf when it said which parts of the resolv.conf file to obey. But for evdns_set_option(), it was really silly, since you wouldn't be calling evdns_set_option() unless you actually wanted to set the option. Its meaning was basically, "set this to DNS_OPTIONS_ALL unless you want a funny surprise." evdns_base_set_option was new in 2.0.1-alpha, so we aren't committed to keeping it source-compatible. | ||
| cfe7a9ff | 2010-02-04 10:15:39 | Merge remote branch 'niels/http_chunk' | ||
| 39781801 | 2010-02-03 16:54:18 | make evhttp_send() safe against terminated connections, too | ||
| e2d15d81 | 2010-02-03 17:52:55 | Merge remote branch 'niels/http_chunk' | ||
| 93d73691 | 2010-02-03 14:34:56 | do not fail while sending on http connections the client closed. when sending chunked requests via multiple calls to evhttp_send_reply_chunk, the client may close the connection before the server is done sending. this used to cause a crash. we introduce a new function evhttp_request_get_connection() that allows the server to determine if the request is still associated with a connection. If it's not, evhttp_request_free() needs to be called explicitly or the user can call evhttp_send_reply_end() which just frees the request, too. | ||
| 60742d58 | 2010-02-03 17:01:45 | Add the rest of the integer limits, and add a test for them. | ||
| 85047a69 | 2010-02-03 15:12:04 | Functions to view and manipulate rate-limiting buckets. We need these for Tor, and other projects probably need them too. Uses include: - Checking whether bandwidth is mostly-used, and only taking some actions when there's plenty of bandwidth. - Deducting some non-bufferevent activities from a rate-limit group. | ||
| aba1fff3 | 2010-02-03 14:37:42 | Add EV_*_MAX macros to event2/util.h to expose limits for ev_* types. | ||
| da6135e3 | 2010-02-03 02:09:19 | Reduce windows header includes in our own headers. It turns out that absolutely everything that was including windows.h was doing so needlessly; our headers don't need it, so we should just include winsock2.h (since that's where struct timeval is defined). Pre-2.0 code will use the old headers, which include windows.h for them, so we aren't breaking source compatibility with 1.4. This solves the bug where we were leaving WIN32_LEAN_AND_MEAN defined, in roughly the same way that buying an automobile solves the question of what to give your coachman for boxing day. | ||
| 27c9a40f | 2010-02-03 02:08:08 | Fix a dumb typo in ev_intptr_t definitions. We said "#define ev_uintptr_t" twice instead of ever saying "#define ev_intptr_t". | ||
| 6c21c895 | 2010-02-03 01:22:44 | Remove EVUTIL_CHECK_FMT. This was never supposed to be an exposed API, so its name should have been more like _EVUTIL_CHECK_FMT. But it was only used in one place, so let's just eliminate it. | ||
| f6b26949 | 2010-02-03 01:16:47 | Deprecate EVENT_FD and EVENT_SIGNAL. These are old aliases for event_get_fd and event_get_signal, and they haven't been the preferred way of doing things since 2.0.1-alpha. For a while, we made them use struct event if it was included, but call event_get_(fd|signal) if it wasn't. This was entirely too cute. | ||
| d38a7a19 | 2010-02-02 15:44:10 | const-ify a few more functions in event.h | ||
| 1fa4c81c | 2010-01-26 12:06:41 | Add ev_[u]intptr_t to include/event2/util.h We already emulate most of the other useful bits of stdint.h, and we seem to have started to use uintptr_t in a few places throughout the code. Let's make sure we can continue to do so even on backwards platforms that don't do C99. | ||
| 361da8f2 | 2010-01-25 13:54:14 | Note a missing ratelim function | ||
| cd17c3ac | 2010-01-22 00:34:37 | Add support for a "debug mode" to try to catch common errors. Right now it only catches cases where we aren't initializing events, or where we are re-initializing events without deleting them first. These are however shockingly common. | ||
| 70a4a3ef | 2010-01-23 16:47:54 | Remove a needless include of rpc_compat.h Nothing in evrpc.c was using rpc_compat.h, so it's best to take it out, especially since it polluted our build process with GCC variadic macros. While we're at it, this patch puts an extra restriction on when the variadic macros in rpc_compat.h are defined. Not only must GCC be the compiler, but GCC must not be running in -ansi mode. | ||
| 918e9c5e | 2010-01-23 16:38:36 | Fix a number of warnings from gcc -pedantic | ||
| ff3f6cd4 | 2010-01-22 16:14:49 | Check more internal event_add() calls for failure Most of these should be unable to fail, since adding a timeout generally always works. Still, it's better not to try to be "too smart for our own good here." There are some remaining event_add() calls that I didn't add checks for; I've marked those with "XXXX" comments. | ||
| 06839503 | 2010-01-19 14:01:36 | Functions to access more fields of struct event. Once event_assign() or event_new() had been called, there was no way to get at a copy of the event's callback, callback argument, or configured events. This patch adds an accessor function for each, and an all-fields accessor for code that wants to re-assign one field of an event. This patch also adds a function to return sizeof(struct event), so that code with intense RAM needs can still retain ABI compatibility between versions of Libevent without having to heap-allocate every struct event individually. The code here was first proposed by Pavel Pisa. | ||
| 5032e526 | 2010-01-14 15:42:07 | do not use a function to assign the evdns base; instead assign it via evhttp_connection_base_new() which is a new function introduced in 2.0 | ||
| c698b77d | 2009-12-30 00:11:27 | Allow http connections to use evdns for hostname looksups. This was as simple as using bufferevent_connect_hostname instead of calling connect() ourself, which already knows how to use an evdns_base if it gets one. Untangling the bind code might be a little trickier. | ||
| b9f43b23 | 2010-01-11 20:47:36 | Add a comment on evthread_enable_lock_debuging. | ||
| 72dd6667 | 2009-12-07 17:21:41 | evdns_getaddrinfo() now supports the /etc/hosts file. The regular blocking evutil_getaddrinfo() already supported /etc/hosts by falling back to getaddrinfo() or gethostbyname(). But evdns_getaddrinfo() had no such facility. Now it does. The data structure here isn't very clever. I guess people with huge /etc/hosts files will either need to get out of the 1980s, or submit a patch to this code so that it uses a hashtable instead of a linked list. Includes basic unit tests. | ||
| ba2945f9 | 2010-01-06 17:59:44 | Merge branch 'ratelimit' Conflicts: bufferevent_async.c | ||
| 1e56a32d | 2009-12-29 16:04:16 | Make the initial nameserver probe timeout configurable. When we decide that a nameserver is down, we stop sending queries to it, except to periodically probe it to see if it has come back up. Our previous probe sechedule was an ad-hoc and hard-wired "10 seconds, one minute, 5 minues, 15 minutes, 1 hour, 1 hour, 1 hour...". There was nothing wrong with having it be ad-hoc, but making it hard-wired served no good purpose. Now the user can set the initial timeout via a new "initial-probe-timeout:" option; future timeouts back off by a factor of 3 on every failure to a maximum of 1 hour. As a side-benefit, this lets us cut the runtime of the dns/retry test from about 40 seconds to about 3 seconds. Faster unit tests are always a good thing. | ||
| d0939d2b | 2009-12-29 16:21:26 | Introduced evutil_make_socket_closeonexec() to preserve fd flags for F_SETFD. Use this to eliminate the various macros that called F_SETFD throughout the code. | ||
| 737c9cd8 | 2009-11-27 13:16:54 | Rate-limiting for bufferevents; group and individual limits are supported. The fairness algorithms are not the best, not every bufferevent type is supported, and some of the locking tricks here are simply absurd. Still, this code should be a good first step. |