|
aab49b60
|
2010-10-21T14:04:24
|
|
Add a bufferevent_get_base function
|
|
d9ffa899
|
2010-10-21T12:48:13
|
|
Update the HTTP regression tests to use Libevent2 apis for non-http stuff
|
|
1f507d75
|
2010-10-21T12:27:16
|
|
Stop using Libevent-1 headers in regress_http
|
|
2a3b5872
|
2010-10-21T12:23:10
|
|
Merge branch 'http_small_tweaks'
Conflicts:
http-internal.h
|
|
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
|
|
1213d3dd
|
2010-10-20T13:41:02
|
|
Fix a 100%-CPU bug where an SSL connection would sometimes never stop trying to write
If an SSL connection becamse disabled or suspended before became open,
it could (under the right circumstances) wind up without ever getting
its write callback disabled.
The most correct fix is probably more subtle, and involves checking
all caseswhen a write callback is enabled or disabled. This fix is
more blunt, and explicitly checks whether the callback should have
been disabled at the end of the callback to prevent infinite looping.
Diagnosed with help from Sebastian Hahn
|
|
f13e449b
|
2010-10-18T14:20:06
|
|
Merge branch 'http_parse'
|
|
49f4bf7c
|
2010-10-18T13:58:02
|
|
Add evhttp_request_get_command so code can tell GET from POST without peeking at the struct.
|
|
e5870690
|
2010-10-18T13:53:31
|
|
Modernize header usage in bench_http.c
|
|
9dc5f44a
|
2010-10-14T22:12:32
|
|
Increment version in git to 2.0.8-rc-dev
|
|
ef18c994
|
2010-10-14T18:36:07
|
|
Increment the version to 2.0.8-rc
NOTE: This is not the official release until I tag it. If you see
this commit, and you decide that Libevent 2.0.8-rc is now
finalized, you might get something besides 2.0.8-rc.
|
|
15be0493
|
2010-10-14T18:35:11
|
|
Changelog and readme for 2.0.8-rc
|
|
4ebf9509
|
2010-10-14T14:40:40
|
|
Fixes for MSVC compilation
|
|
d3b096c0
|
2010-10-14T13:54:15
|
|
Make the --enable-gcc-warnings option include signed comparison warnings
|
|
e06f514d
|
2010-10-14T13:51:24
|
|
Fix signed/unsigned warnings on win32
|
|
6be589ae
|
2010-10-14T13:48:40
|
|
Fix signed/unsigned warnings on opensolaris, where iov_len is signed
|
|
e5c214a4
|
2010-10-14T13:16:41
|
|
Fix -Wsigned-compare warnings in test/*
|
|
f2763fa8
|
2010-10-14T13:16:00
|
|
add limits.h to event_tagging.c so opensolaris will build
|
|
5e4bafbb
|
2010-10-14T13:15:32
|
|
fix a signed/unsigned warning in kqueue.c
|
|
02f6259f
|
2010-10-14T11:44:32
|
|
New unit test for ssl bufferevents starting with connected SSLs.
|
|
93bb7d8e
|
2010-10-14T11:41:10
|
|
Fix a case where an ssl bufferevent with CLOSE_ON_FREE didn't close its fd
This could happen when we got an SSL with a BIO already set on it.
|
|
223ee40f
|
2010-10-14T10:53:26
|
|
Avoid spurious reads from just-created open openssl bufferevents
When handshaking, we listen for reads or writes from the
transport. But when we're connected, we start out with writes enabled
and reads disabled, which means we should not have the transport read
for us.
|
|
34331e45
|
2010-10-08T01:09:02
|
|
The corrected bufferevent filter semantics let us fix our openssl tests
|
|
ac27eb82
|
2010-10-08T00:59:02
|
|
Correct logic on disabling underlying bufferevents when disabling a filter
Previously, whenever writing was disabled on a bufferevent_filter (or
a filtering SSL bufferevent), we would stop writing on the underlying
bufferevent. This would make for trouble, though, since if you
implemented common patterns like "stop writing once data X has been
flushed", your bufferevent filter would disable the underlying
bufferevent after the data was flushed to the underlying bufferevent,
but before actually having it written to the network.
Now, we have filters leave their underlying bufferevents enabled for
reading and writing for reading and writing immediately. They are not
disabled, unless the user wants to disable them, which is now allowed.
To handle the case where we want to choke reading on the underlying
bufferevent because the filter no longer wants to read, we use
bufferevent_suspend_read(). This is analogous to the way that we use
bufferevent_suspend_write() to suspend writing on a filtering
bufferevent when the underlying bufferevent's output buffer has hit
its high watermark.
|
|
34d64f8a
|
2010-10-12T13:46:14
|
|
Fix serious bugs in per-bufferevent rate-limiting code
Our old code was too zealous about deleting the refill events that
would actually make connections able to read or write again after
they had run out of bandwidth. Under some circumstances, this could
cause a bufferevent to never actually refill one of its
rate-limiting buckets.
Also, the code treated setting a per-connection rate-limit on a
connection that already had a group-limit as if it were changing the
limit on a connection whose allocation had already run out.
This patch fixes both of those problems.
|
|
819b1715
|
2010-10-12T12:59:13
|
|
Handle rate-limiting for reading on OpenSSL bufferevents correctly.
We were looking at the number of bytes read on the wbio, not in the
rbio. But these are usually different BIOs, and the reading is
supposed to happen on the rbio.
|
|
7ad90f6a
|
2010-10-09T00:02:31
|
|
Merge branch '20_internal_prio'
|
|
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.
|
|
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.
|
|
08ebd267
|
2010-10-07T21:06:25
|
|
Merge branch 'iovmax'
|
|
62b429af
|
2010-10-07T13:41:39
|
|
Make iocp/listener/error work; don't accept again if lev is disabled.
|
|
12057035
|
2010-10-07T18:05:01
|
|
Turn some booleans in evconnlistener_iocp into one-bit bitfields.
|
|
481ef920
|
2010-09-23T17:41:49
|
|
Fix allocation error for IOCP listeners. Probably harmless, since struct event is big
|
|
127d4f21
|
2010-09-23T16:49:58
|
|
Add a LEV_OPT_THREADSAFE option for threadsafe evconnlisteners
|
|
3b844893
|
2010-10-06T12:35:38
|
|
Tweak evhttp_parse_query hack to avoid breaking abi
|
|
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.
|
|
fdc640b0
|
2010-10-05T21:34:07
|
|
Fix an EINVAL on evbuffer_write_iovec on OpenSolaris.
The writev() call is limited to at most IOV_MAX iovecs (or UIO_MAXIOV,
depending on whom you ask). This isn't a problem anywhere we've
tested except on OpenSolaris, where IOV_MAX was a mere 16.
This patch makes us go from "use up to 128 iovecs when writing" to
"use up to 128 iovecs when writing, or IOV_MAX/UIO_MAXIOV, whichever
is less". This is still wrong if you somehow find a platform that
defines IOV_MAX < UIO_MAXIOV, but I hereby claim that such a platform
is too stupid to worry about for now.
Found by Michael Herf.
|
|
5b7a3706
|
2010-10-05T14:29:48
|
|
Fix warnings on mingw with gcc 4.5
|
|
145f221e
|
2010-10-05T13:06:32
|
|
Define symbolic constants to use in place of SHUT_RD etc
|
|
e0fd8708
|
2010-10-05T13:01:54
|
|
Send a shutdown(SHUT_WR) before closing an http connection
This avoids getting an ECONNRESET from the TCP stack.
Fixes bug 2928690
|
|
0faaee01
|
2010-09-30T23:15:47
|
|
Fix a spurious-call bug on epoll.c
We were trying to check whether any events had really been
notified on an fd before calling evmap_io_active on it, but instead
we were checking for an event pointer, which was always true.
In practice, this patch shouldn't change much, since epoll_wait
shouldn't return an event unless there is actually an event going
on.
Spotted by an anonymous bug reporter on Sourceforge. Closes bug
3078425.
|
|
a8b7674c
|
2010-09-28T01:09:17
|
|
Merge remote branch 'github/signed_compare'
|
|
a78ac0fa
|
2010-09-27T16:05:20
|
|
Merge remote branch 'github/win_lib'
|
|
d49b5e33
|
2010-09-27T15:12:55
|
|
Do not search outside of the system directory for windows DLLs
Hardens against some attacks.
|
|
b3953927
|
2010-09-27T21:14:28
|
|
Fix compile in kqueue.c
Commit 38d09606 removed the evsigbase pointer, but forgot to remove
an assignment to it in kqueue.c.
|
|
9c8db0f8
|
2010-09-23T22:45:55
|
|
Fix all warnings in the main codebase flagged by -Wsigned-compare
Remember, the code
int is_less_than(int a, unsigned b) {
return a < b;
}
is buggy, since the C integer promotion rules basically turn it into
int is_less_than(int a, unsigned b) {
return ((unsigned)a) < b;
}
and we really want something closer to
int is_less_than(int a, unsigned b) {
return a < 0 || ((unsigned)a) < b;
}
.
Suggested by an example from Ralph Castain
|
|
045eef4c
|
2010-09-23T14:23:45
|
|
Unit tests for listener error callbacks
|
|
c4be8d82
|
2010-09-20T12:47:39
|
|
Add error callback to evconnlistener
|
|
e1198997
|
2010-09-21T22:44:39
|
|
Make event.c debugging messages report fds
|
|
ec2b05ed
|
2010-09-21T22:23:32
|
|
Make debugging output for epoll backend more comprehensive
|
|
90651b32
|
2010-09-17T00:24:50
|
|
Put internal events at highest priority
(If we allow user events to starve internal events, then internal events
never actually happen, signals don't get acked, etc)
|
|
38d09606
|
2010-09-15T12:50:31
|
|
Remove event_base.evsigbase; nothing used it.
|
|
4858b794
|
2010-09-15T01:54:51
|
|
Remove the now-useless evsig_caught and evsig_process
|
|
95a7d418
|
2010-09-15T01:40:02
|
|
Make default signal backend fully threadsafe
Jason Toffaletti discovered with helgrind that our signal handler was
messing with evsig_base, which can be set from lots of places in the
code. Ordinarly, we'd just stick a lock on it, except that it is
illegal (and genuinely error-prone) to call pthread_mutex_acquire()
from inside a signal handler.
The solution is to only store the fd we write to in a static variable,
write the signal number to the fd, and put evsig_cb in charge of
activating signal events.
I have no idea how we'll cope if we want to enable this to handle
siginfo (where available) in the future.
|
|
720bd933
|
2010-09-15T01:08:39
|
|
Warn when using the error-prone EV_SIGNAL interface in an error-prone way. Also, fix a couple of race conditions in signal.c
When using the signal.c signal backend, Libevent currently only allows
one event_base to actually receive signals at a time. (This has been
the behavior since at least 1.4 and probably much earlier.) Now, we
detect and warn if you're likely to be racing about which signal goes
to which thread.
We also add a lock to control modifications of the evsig_base field,
to avoid race conditions like those found by Jason Toffaletti.
Also, more comments. Comments are good.
|
|
040a019f
|
2010-09-09T17:19:20
|
|
Obey enabled status when unsuspending
|
|
f0bd83ea
|
2010-09-09T16:13:09
|
|
Bump to the latest version of tinytest
This lets us do without libevent-specific code in tinytest.c, and
lets us add a feature to skip individual tests from the command
line.
|
|
a5ce9ad4
|
2010-09-09T16:01:42
|
|
Make SSL tests cover enabling/disabling EV_READ.
I want my 80% coverage.
|
|
5811d74c
|
2010-09-09T15:59:18
|
|
Bump version to 2.0.7-rc-dev
|
|
fe008ed6
|
2010-09-09T14:59:27
|
|
Make all versioning changes for 2.0.7-rc, and add ChangeLog
|
|
d98511c0
|
2010-09-09T14:36:45
|
|
Make event_base_virtual_del() notify the base if needed
|
|
2756a10c
|
2010-09-09T13:43:31
|
|
Add a missing time.h include to test/regress_thread.c
|
|
fb36f9a7
|
2010-09-09T13:00:54
|
|
Fix an uninitialized-variable warning on windows
|
|
71b68014
|
2010-09-08T20:33:21
|
|
Don't decrement virutal event count twice in connect_complete.
|
|
3ec65d69
|
2010-09-08T19:55:13
|
|
Fix a few Windows compile warnings.
|
|
25b6a74b
|
2010-09-08T14:53:57
|
|
Merge branch 'tests'
|
|
6f821710
|
2010-09-08T14:52:37
|
|
Merge remote branch 'github/win_notify'
|
|
de412948
|
2010-09-08T14:52:24
|
|
Add a missing header for regress_thread.c
|
|
e7dc501e
|
2010-09-08T14:40:51
|
|
Implement EVBASE_NEED_NOTIFY on win32
|
|
911e0db8
|
2010-09-08T20:29:39
|
|
Fix a compile warning in regress_thread.c
|
|
3658b169
|
2010-09-08T14:12:12
|
|
Merge remote branch 'chrisd/iocp-fixes4'
Conflicts:
test/regress_thread.c
|
|
9580e282
|
2010-09-08T14:00:45
|
|
Merge branch 'th_notify_fd_reinit'
|
|
ce85280b
|
2010-09-08T13:29:06
|
|
Improve testing of when thread-notification occurs
|
|
4632b78e
|
2010-09-08T13:22:55
|
|
Minimize calls to base_notify implementation functions, thereby avoiding needless syscalls
The trick here is that if we already told the base to wake up, and it
hasn't woken up yet, we don't need to tell it to wake up again. This
should help lots with inherently multithreaded code like IOCP.
|
|
c7a06bfa
|
2010-09-08T13:02:58
|
|
Avoid needlessly calling evthread_notify_base() when the loop is not running
Also make sure that we always hold the base lock when calling evthread_notify_base.
|
|
57d3413c
|
2010-09-08T11:39:24
|
|
Merge remote branch 'github/globals'
|
|
17a14f1a
|
2010-09-01T11:04:57
|
|
Only process up to MAX_DEFERRED deferred_cbs at a time.
If threads queue callbacks while event_process_deferred_callbacks is
running, the loop may spin long enough to significantly skew timers.
A unit test stressing this behavior is also in this commit.
|
|
2447fe88
|
2010-08-28T04:07:48
|
|
Add event_config_set_num_cpus_hint for tuning thread pools, etc.
|
|
499452f4
|
2010-08-28T02:44:11
|
|
IOCP-related unit test tweaks
|
|
76f7e7ae
|
2010-08-17T05:02:00
|
|
Some IOCP bufferevent tweaks.
- Increment reference count of bufferevents before initiating overlapped
operations to prevent the destructor from being called while operations
are pending. The only portable way of canceling overlapped ops is to
close the socket.
- Translate error codes to WSA* codes.
- Better handling of errors.
- Add an interface to add and del "virtual" events. Because IOCP
bufferevents don't register any events with the base, the event loop
has no way of knowing they exist. This causes the loop to terminate
prematurely. event_base_{add,del}_virtual increment/decrement base's
event count so the loop runs while there are any enabled IOCP
bufferevents.
|
|
d844242f
|
2010-08-28T02:08:27
|
|
Stop IOCP when freeing the event_base.
|
|
03afa209
|
2010-08-16T01:23:57
|
|
IOCP-related evbuffer fixes.
- Prevent evbuffer_{add,prepend}_buffer from moving read-pinned chains.
- Fix evbuffer_drain to handle read-pinned chains better.
- Raise the limit on WSABUFs from two to MAX_WSABUFS for overlapped reads.
|
|
1115366e
|
2010-09-07T10:28:15
|
|
Fix a few memory leaks in the tests
|
|
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.
|
|
c51826ff
|
2010-09-06T15:40:13
|
|
Merge remote branch 'github/sysqueue_include_order'
|
|
b0f284cb
|
2010-09-06T10:10:17
|
|
Fix event_del(0) instance in bench.c
|
|
749128b2
|
2010-09-04T22:02:32
|
|
Merge remote branch 'github/win32_posix_underscore'
|
|
150599e6
|
2010-09-04T22:00:38
|
|
Merge remote branch 'github/cdecl'
|
|
b5dd8064
|
2010-09-03T22:00:25
|
|
Fix uninitialized port var in http_delete_test. Last one, I hope.
|
|
3b3fb743
|
2010-09-03T21:03:25
|
|
Fix uninitialized variables in http_bad_request_test. (oops)
|
|
a97320ac
|
2010-09-03T18:48:31
|
|
Allow more than one copy of regression tests to run at once
Mostly this was a matter of just removing all the hardwired ports in
the test code. The http/connection_retry test is still a little
screwy, though.
|
|
19521436
|
2010-09-03T16:42:16
|
|
Expose a function to add a nameserver by sockaddr
|
|
fab50488
|
2010-09-03T16:41:16
|
|
Expose a function to getsockname() on a listener's fd.
|
|
7ea8e89d
|
2010-09-03T15:12:35
|
|
Prefer autoreconf -ivf to manual autogen.sh
Suggested by Ralph Castain
|
|
47882773
|
2010-09-02T13:21:17
|
|
Fix pointer-to-__cdecl-function syntax
|
|
e50c0fcc
|
2010-09-02T11:10:50
|
|
Use the _func() replacements for open, fstat, etc in evutil.c on win32
Remember that in a fit of ANSI C compliance, Microsoft decided to
screw portability by renaming basically all the functions in unistd.h to
get prefixed with an understore.
For some reason, mingw didn't seem to mind, but at least some people's
compilers did: see bug 3044490.
|
|
f0056d04
|
2010-09-02T12:06:58
|
|
Declare signal handler function as "__cdecl" on Windows.
I swear, they must have half a dozen different calling conventions.
(goes to check)
Holy crud. They actually do. There's __cdecl, __stdcall, __fastcall,
"thiscall", "naked" and the obsolete "__pascal", "__fortran", and
"__syscall". And don't forget WINAPI and __far.
Anyways, this should fix 3044488 if I got it right.
|
|
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.
|
|
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
|
|
495ed667
|
2010-09-01T16:36:30
|
|
Close th_notify_fds and open a new pair on reinit
After a fork, you want subthreads to wake up the event_base in the
child process, not to have the child process and the main process
fight over who wakes up whom.
Related to a problem found by Nicholas Marriott while debugging
3048812.
|