include/event2


Log

Author Commit Date CI Message
Nick Mathewson be1aeff2 2014-10-09T10:14:12 Fix a typo in a doxygen comment. Reported by 亦得.
Nick Mathewson eaa79cd4 2013-12-20T13:37:04 Merge remote-tracking branch 'sourceforge/patches-2.0' into patches-2.0 Conflicts: include/event2/event.h
Nick Mathewson 8cd695bf 2013-12-20T13:31:29 Typo fixes from Linus Nordberg
Nick Mathewson cec62cb8 2013-12-20T13:31:29 Typo fixes from Linus Nordberg
Nick Mathewson 031a8030 2013-12-16T12:02:21 Clarify event_base_loop exit conditions
Nick Mathewson d44f91ad 2013-08-13T10:59:20 Finish a sentence
Nick Mathewson 2bbb5d76 2013-08-06T17:06:23 Add evutil_secure_rng_set_urandom_device_file This experimental function is needed for some seccomp2 hackery to work, and should have no effect for systems that don't use it.
Nick Mathewson 6e496961 2013-06-10T10:38:12 Document that arc4random is not a great cryptographic PRNG.
Nick Mathewson 773b0a5d 2013-03-25T21:12:49 Fix a typo in a comment in buffer.h. Spotted by Alt_F4
Nick Mathewson 117e3273 2012-06-14T13:25:10 Add GCC annotations so that the vsprintf functions get checked properly
Nick Mathewson d1a03b2f 2012-04-03T18:31:08 Backport: provide EVENT_LOG_* names, and deprecate _EVENT_LOG_* This is a partial backport of cb9da0bf and a backport of c9635349. Because C doesn't like us to declare identifiers starting with an underscore, Libevent 2.1 has renamed every such identifier. The only change that affects a public API is that the _EVENT_LOG_* macros have been renamed to start with EVENT_LOG instead. The old names are still present, but deprecated. I'm doing this backport because it represents the deprecation of a Libevent 2.0 interface, and folks should have the opportunity to write code that isn't deprecated and works with both 2.0 and 2.1.
Nick Mathewson 98e9119f 2012-03-25T18:56:15 Fix a typo in the bufferevent documentation
Nick Mathewson e49e2891 2012-02-10T17:29:53 Update copyright notices to 2012
Arno Bakker da70fa70 2011-12-14T16:17:19 Backport evhttp_connection_get_bufferevent to Libevent 2.0 Backport by Arno Bakker; original implementation in 8d3a8500f4
Nick Mathewson 7bbf6ca7 2011-12-08T14:36:32 Slightly clarify evbuffer_peek documentation
Nick Mathewson 3c824bd3 2011-10-24T13:18:09 Update copyright dates to 2011.
Nick Mathewson 724bfb56 2011-10-19T22:59:47 Add note about evhttp_send_reply_end to its doxygen
Greg Hazel ba5c27d4 2011-10-10T08:24:43 refer to non-deprecated evdns functions in comments
Nick Mathewson 0ba0af9c 2011-09-29T09:30:04 Prefer mmap to sendfile unless a DRAINS_TO_FD flag is set. Allows add_file to work with SSL. The sendfile() implementation for evbuffer_add_file is potentially more efficient, but it has a problem: you can only use it to send bytes over a socket using sendfile(). If you are writing bytes via SSL_send() or via a filter, or if you need to be able to inspect your buffer, it doesn't work. As an easy fix, this patch disables the sendfile-based implementation of evbuffer_add_file on an evbuffer unless the user sets a new EVBUFFER_FLAG_DRAINS_TO_FD flag on that evbuffer, indicating that the evbuffer will not be inspected, but only written out via evbuffer_write(), evbuffer_write_atmost(), or drained with stuff like evbuffer_drain() or evbuffer_add_buffer(). This flag is off by default, except for evbuffers used for output on bufferevent_socket. In the future, it could be interesting to make a best-effort file segment implementation that tries to send via sendfile, but mmaps on demand. That's too much complexity for a stable release series, though.
Leonid Evdokimov 94fba5b9 2011-08-10T15:58:47 Add DNS_ERR_NODATA error code to handle empty replies.
Leonid Evdokimov 2b6eae59 2011-08-10T15:58:19 Fix docstring in dns.h
Leonid Evdokimov 50be5a14 2011-08-11T03:06:07 Another docstring fix.
Nick Mathewson 1183f7e2 2011-08-01T10:27:56 Fix typo in event_compat.h comments.
Nick Mathewson 2888facc 2011-07-04T23:02:11 Revise the event/evbuffer/bufferevent doxygen for clarity and accuracy
Nick Mathewson 9556a7d1 2011-05-02T23:22:09 Add missing words to EVLOOP_NONBLOCK documentation
Nick Mathewson c8baac90 2011-03-07T21:55:47 Followup for Tomash Brechko's http patch This patch makes bufferevent_disable_hard() non-public, and adds a comment about what it's for and why it's used.
Tomash Brechko 5dc56628 2011-02-24T12:30:40 Workaround libevent bug https://sourceforge.net/tracker/index.php?func=detail&aid=3078187&group_id=50884&atid=461324 The problem is that bufferevent_disable() doesn't disable EV_WRITE when 'connecting' flag is set. However from evhttp_connection_reset() we want to disable EV_WRITE for sure (we are closing the socket next). So we add bufferevent_disable_hard(), which acts like bufferevent_disable(), but resets 'connecting' flag before the call to the actual handler. TODO: bufferevent_disable_hard() shouldn't be public, remove it from event2/bufferevent.h.
Nick Mathewson 5dc200b7 2011-02-22T18:53:55 Merge branch '20_uri_nonconformant' into patches-2.0
Nick Mathewson f95bafb6 2011-02-22T00:34:49 Be explicit about how long event loops run in event.h documentation
Nick Mathewson f6659246 2011-02-15T11:33:40 Correct evhttp_del_accept_socket documentation on whether socket is closed Thanks to Constantine Verutin for pointing this out.
Nick Mathewson 926f8165 2011-02-13T00:54:21 Clarify event_set_mem_functions doc
Nick Mathewson 95060b54 2011-02-13T00:41:22 Make URI parser able to tolerate nonconformant URIs. If the EVHTTP_URI_NONCONFORMANT flag is passed in (which it is when parsing URIs we get over the wire), then we relax our checks a lot. Specifically, we do nothing to check for correct characters in the path, query, and fragment parts of such a URI. We could do much more here: we could relax our hostname requirements, deal with spaces differently/better, trap some errors but not others, etc. But this should solve the worst user-agent compatibility issues for now; the other issues can wait for a later release.
Nick Mathewson 57689c44 2010-12-09T12:17:11 Document that the cpu_hint is only used on Windows with IOCP for now
Nick Mathewson bb0d2b4e 2010-12-09T11:47:54 Consistentize tabs
Nick Mathewson 22f4af65 2010-12-09T11:43:12 Remove end-of-line whitespace
Constantine Verutin d23839fc 2010-12-07T11:43:52 Reject overlong http requests early when Expect:100-continue is set
Christopher Davis fa9305f8 2010-11-29T18:25:04 Preliminary support for Continue expectation in evhttp.
Christopher Davis aab8c38b 2010-11-05T11:17:07 Add evhttp server alias interface, correct flagging of proxy requests. evhttp needs to be mindful of all hostnames and addresses that clients use to contact the main server and vhosts to know the difference between proxy requests and non-proxy requests.
Nick Mathewson 2e5a175b 2010-11-25T23:03:46 Merge remote branch 'github/20_once_fixes'
Kevin Bowling 1cd45e56 2010-11-23T19:26:34 If not WIN32, include <sys/socket.h> in event2/util.h.
Kevin Bowling 2e2a3d7b 2010-11-23T19:09:08 Reworked AIX __ss_family workaround to use AC_STRUCT_MEMBER.
Nick Mathewson 652024b6 2010-11-23T13:08:07 Remove _event_initialized(); make event_initialized() a function(); make it consistent on windows and non-windows
Nick Mathewson 88be27dc 2010-11-23T12:26:46 Document event_get_assignment
Nick Mathewson e431bcd6 2010-11-23T12:26:34 Note that reentrant calls to libevent from logging cbs may fail badly
Nick Mathewson 7bcace2d 2010-11-22T21:02:34 Fix some irix compilation warnings spotted by Kevin Bowling
Nick Mathewson 26049c2f 2010-11-22T16:24:52 Merge remote branch 'github/20_getaddrinfo_cancel_v2'
Nick Mathewson 9531763a 2010-11-14T17:52:16 Disable changelist for epoll by default because of Linux dup() bug; add an option and/or an envvar to reenable it for speed. Rename option to control epoll changelist; make epoll changelist off by default
Nick Mathewson 49418612 2010-11-16T12:55:10 Use the US-English "canceled", not the UK "cancelled".
Nick Mathewson 057a5146 2010-11-14T19:34:49 Clarify EVLOOP_* documentation to be more precise.
Nick Mathewson 5c8a59e8 2010-11-09T10:19:05 Merge remote branches 'github/20_evdns_cancel_segfault_v2', 'github/20_http_close_detect', 'github/20_http_versions', 'github/20_more_http_methods', 'github/20_shutdown_iocp_listener' and 'github/20_win64_fixes'
Nick Mathewson 229714d1 2010-11-04T16:04:28 Fix a mistake in http documentation found by Julien Blache
Nick Mathewson f5b391e2 2010-11-04T11:53:34 Tweak interface for allowed methods
Felix Nawothnig 75a73414 2010-11-04T11:25:35 Define enumerators for all HTTP methods, including PATCH from RFC5789 This patch defines enumerators for all HTTP methods that exist (including PATCH introduced in RFC 5789). It also makes them bit-masky (that's not a word, is it?), breaking binary- but not source-code compatibility. evhttp now stores a bitmask specifying for which methods requests to dispatch and which ones to reject with "405 Method Not Allowed". By default that's the ones we currently have (GET, POST, HEAD, PUT, DELETE), thereby keeping functional compatibility (besides the minor change that one of the other methods will now cause 405 instead of 400. But I believe that could even be considered a bug-fix). evhttp is extended by evhttp_set_allowed_methods() with which the user can change that bitmask. no regressions here and my test-app still works. Haven't yet actually tested any of the new methods. What's obviously missing here is the special logic for the methods: OPTIONS: We should be fine here - I believe our current dispatch logic should work fine. Some convenience functions would be fine though. TRACE: I'm pretty certain we should never dispatch this to the callbacks and simply implement the necessary functionality built-in. CONNECT: Pretty straight-forward to implement (and considering the framework in which we implement it very efficient too). Should probably go built-in. PATCH: Except for checking the RFC against our pre-dispatch logic (there just might be some "MUST not have Some-Header" lurking somewhere) there is nothing to be done here, this is completely up to the user. Nothing to do.
Nick Mathewson 22e0a9b2 2010-11-03T15:12:08 Add evhttp_response_code to remove one more reason to include http_struct.h
Nick Mathewson 73bf07fe 2010-10-26T21:33:13 Merge remote branch 'github/20_abi_breaks'
Nick Mathewson a4063c06 2010-10-26T10: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).
Nick Mathewson 2cbb1a16 2010-10-26T10: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.
Nick Mathewson 9c71a341 2010-10-25T15:13:32 Merge remote branch 'github/http_and_listener'
Nick Mathewson ac7e52d8 2010-10-25T14: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.
Nick Mathewson 006efa7d 2010-10-25T11:50:51 Functions to actually use evhttp_bound_socket with/as evconnlistener.
Nick Mathewson 46ee061c 2010-10-25T11: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.
Nick Mathewson bf11e7dd 2010-10-21T15:33:13 Merge branch 'http_uri_parse'
Nick Mathewson 45f6869c 2010-10-21T14:41:12 Make evhttp_uri non-public, and give it accessor functions.
Nick Mathewson 70e1b607 2010-10-21T14:05:04 Document that two bufferevent functions only work on socket bufferevents
Nick Mathewson aab49b60 2010-10-21T14:04:24 Add a bufferevent_get_base function
Nick Mathewson cd00079b 2010-10-21T12: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
Nick Mathewson 2075fbcf 2010-10-19T13: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.
Nick Mathewson 3a334628 2010-10-19T13:02:18 Document behavior of URI parsing more thoroughly. Also, move evhttp_uri struct into http.h, since it is part of the API.
Nick Mathewson eaa5f1d9 2010-10-19T11:26:59 Revise evhttp_uri_parse implementation to handle more of RFC3986
Nick Mathewson 7d45431e 2010-10-18T14:38:48 Do not silently truncate URIs in evhttp_uri_join. Also avoid evbuffer_pullup.
Pavel Plesov 86dd720a 2010-08-08T16:46:39 Introduce absolute URI parsing helpers. See evhttp_uri_parse(), evhttp_uri_free() and evhttp_uri_join() for details.
Nick Mathewson f13e449b 2010-10-18T14:20:06 Merge branch 'http_parse'
Nick Mathewson 49f4bf7c 2010-10-18T13:58:02 Add evhttp_request_get_command so code can tell GET from POST without peeking at the struct.
Nick Mathewson a8148ced 2010-10-08T13: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.
Nick Mathewson 2e63a604 2010-10-08T12: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.
Nick Mathewson 127d4f21 2010-09-23T16:49:58 Add a LEV_OPT_THREADSAFE option for threadsafe evconnlisteners
Nick Mathewson 3b844893 2010-10-06T12:35:38 Tweak evhttp_parse_query hack to avoid breaking abi
Nick Mathewson b1756d01 2010-10-06T11: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.
Simon Perreault c4be8d82 2010-09-20T12:47:39 Add error callback to evconnlistener
Christopher Davis 2447fe88 2010-08-28T04:07:48 Add event_config_set_num_cpus_hint for tuning thread pools, etc.
Nick Mathewson 42090072 2010-09-06T15: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.
Nick Mathewson c51826ff 2010-09-06T15:40:13 Merge remote branch 'github/sysqueue_include_order'
Nick Mathewson 19521436 2010-09-03T16:42:16 Expose a function to add a nameserver by sockaddr
Nick Mathewson fab50488 2010-09-03T16:41:16 Expose a function to getsockname() on a listener's fd.
Nick Mathewson ca9048f1 2010-09-02T11: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.
Nick Mathewson d3ceca80 2010-09-02T11:27:57 Declare evkeyvalq and event_list even if event_struct.h comes before sys/queue.h Fixes bug 3036645 reported by Mihai Draghicioiu
Nick Mathewson d4977b52 2010-08-17T13: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*.
Gilad Benjamini 60433a0a 2010-08-13T17: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)
Nick Mathewson 33200e72 2010-08-10T15:03:14 Document that DNS_NO_SEARCH is an obsolete alias for DNS_QUERY_NO_SEARCH
Nick Mathewson 3808168d 2010-08-10T15:02:50 Completely remove the (mostly-removed) obsolete thread functions.
Nick Mathewson ec347b92 2010-07-07T16: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.
Nick Mathewson 6ae53d67 2010-08-04T15:44:08 Add an interface to expose min_share in ratelimiting groups
Nick Mathewson cc2379d2 2010-07-26T14:48:32 Constify a couple of arguments to evdns_server_request_add_*_reply
Nick Mathewson e1c1167c 2010-07-22T14: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.
Nick Mathewson 215e629c 2010-06-21T12: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.
Nick Mathewson 7b259b67 2010-06-21T12:24:49 Fix sentence fragment in docs for event_get_struct_event_size()
Nick Mathewson e21f5d15 2010-06-19T18:21:40 Document a change in the semantics of event_get_struct_event_size()
Nick Mathewson 276e7ee9 2010-06-11T11:57:13 Fix a pedantic gcc 4.4 warning in event2/event.h
Nick Mathewson 17a8e2d7 2010-06-07T12:06:43 Add a function to retrieve the other side of a bufferevent pair
Felix Nawothnig 06bd0563 2010-05-26T12: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.