Evan Jones [Mon, 6 Dec 2010 19:17:44 +0000 (14:17 -0500)]
EVUTIL_ASSERT: Use sizeof() to avoid "unused variable" warnings.
Nick Mathewson [Thu, 9 Dec 2010 17:17:58 +0000 (12:17 -0500)]
Add stuff to whatsnew based on reading include changes since August.
Nick Mathewson [Thu, 9 Dec 2010 17:17:11 +0000 (12:17 -0500)]
Document that the cpu_hint is only used on Windows with IOCP for now
Nick Mathewson [Thu, 9 Dec 2010 16:47:54 +0000 (11:47 -0500)]
Consistentize tabs
Nick Mathewson [Thu, 9 Dec 2010 16:43:12 +0000 (11:43 -0500)]
Remove end-of-line whitespace
Nick Mathewson [Thu, 9 Dec 2010 16:40:35 +0000 (11:40 -0500)]
tweak readme, whatsnew
Nick Mathewson [Tue, 7 Dec 2010 16:45:14 +0000 (11:45 -0500)]
Fix a signed/unsigned comparison in the last commit
Constantine Verutin [Tue, 7 Dec 2010 16:43:52 +0000 (11:43 -0500)]
Reject overlong http requests early when Expect:100-continue is set
Evan Jones [Thu, 2 Dec 2010 19:13:33 +0000 (14:13 -0500)]
tests: Use relative includes ("") instead of system includes (<>)
Evan Jones [Thu, 2 Dec 2010 19:09:52 +0000 (14:09 -0500)]
tests: Use new event2 headers instead of old compatibility headers.
Evan Jones [Thu, 2 Dec 2010 15:26:12 +0000 (10:26 -0500)]
Use relative includes instead of system includes consistently.
Evan Jones [Thu, 2 Dec 2010 15:27:06 +0000 (10:27 -0500)]
bufferevent-internal.h: Use the new event2/util.h header, not evutil.h
Nick Mathewson [Thu, 2 Dec 2010 02:28:03 +0000 (21:28 -0500)]
Correctly notify the main thread when activating an event from a subthread
Kelly Brock [Tue, 30 Nov 2010 16:34:26 +0000 (11:34 -0500)]
Minor fix for IOCP shutdown handling fix
Call setsockopt() on the actual new socket, not on as->s, which was
set to INVALID_SOCKET.
Nick Mathewson [Tue, 30 Nov 2010 07:19:25 +0000 (02:19 -0500)]
Increment version to 2.0.9-rc-dev
Nick Mathewson [Tue, 30 Nov 2010 06:21:00 +0000 (01:21 -0500)]
Give the correct date for 2.0.9-rc in the changelog
Nick Mathewson [Tue, 23 Nov 2010 16:17:24 +0000 (11:17 -0500)]
Increment version to 2.0.9-rc
Nick Mathewson [Tue, 23 Nov 2010 16:17:06 +0000 (11:17 -0500)]
Bump VERSION_INFO to 5:0:0
Nick Mathewson [Tue, 23 Nov 2010 16:08:30 +0000 (11:08 -0500)]
Changelog and acknowledgments for 2.0.9-rc
Nick Mathewson [Tue, 30 Nov 2010 05:53:16 +0000 (00:53 -0500)]
Fix win32 build of http-server.c with unicode enabled
Nick Mathewson [Tue, 30 Nov 2010 05:05:54 +0000 (00:05 -0500)]
Correctly detect timeouts during http connects
Nick Mathewson [Tue, 30 Nov 2010 03:44:18 +0000 (22:44 -0500)]
Try to fix an assertion failure related to close detection
f700566c removed a line from evhttp_connection_stop_detectclose that
cleared the EVHTTP_CON_CLOSEDETECT flag. I think this was an
accident, and suspect that it may be the cause of bug
3069555.
Nick Mathewson [Tue, 30 Nov 2010 03:14:54 +0000 (22:14 -0500)]
Possible crash fix when freeing an underlying bufferevent of an openssl bufferevent
Nick Mathewson [Tue, 30 Nov 2010 02:56:23 +0000 (21:56 -0500)]
Merge remote branch 'chrisd/http_continue'
Christopher Davis [Tue, 30 Nov 2010 02:25:04 +0000 (18:25 -0800)]
Preliminary support for Continue expectation in evhttp.
Nick Mathewson [Tue, 30 Nov 2010 01:39:09 +0000 (20:39 -0500)]
make http-server example code build on win32
Nick Mathewson [Tue, 30 Nov 2010 01:13:19 +0000 (20:13 -0500)]
Fix http-server.c compilation on freebsd
Nick Mathewson [Mon, 29 Nov 2010 19:25:33 +0000 (14:25 -0500)]
Merge remote branch 'chrisd/http_fixes2'
Christopher Davis [Mon, 29 Nov 2010 15:18:32 +0000 (07:18 -0800)]
Add a few more comments.
Nick Mathewson [Fri, 26 Nov 2010 18:29:56 +0000 (13:29 -0500)]
add http-server to gitignore
Nick Mathewson [Fri, 26 Nov 2010 18:28:48 +0000 (13:28 -0500)]
Fix a misplaced ) in http_server.c
Nick Mathewson [Fri, 26 Nov 2010 17:59:02 +0000 (12:59 -0500)]
Merge branch '20_empty_body'
Nick Mathewson [Mon, 18 Oct 2010 17:44:05 +0000 (13:44 -0400)]
Add a basic example of how to write a static HTTP server.
Christopher Davis [Fri, 5 Nov 2010 18:17:07 +0000 (11:17 -0700)]
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 [Fri, 26 Nov 2010 04:03:46 +0000 (23:03 -0500)]
Merge remote branch 'github/20_once_fixes'
Kevin Bowling [Wed, 24 Nov 2010 02:40:23 +0000 (19:40 -0700)]
Fix snprintf related failures on IRIX.
Kevin Bowling [Wed, 24 Nov 2010 02:26:34 +0000 (19:26 -0700)]
If not WIN32, include <sys/socket.h> in event2/util.h.
Kevin Bowling [Tue, 23 Nov 2010 21:09:03 +0000 (14:09 -0700)]
xlC doesn't obey C99 comments here. autoconf isn't invoking full C99
mode.
Kevin Bowling [Tue, 23 Nov 2010 07:22:01 +0000 (00:22 -0700)]
Add some checks since lack of TAILQ_FOREACH doesn't imply lack of FIRST,
END, NEXT, or INSERT_BEFORE. Quiet some warnings in XL C.
Kevin Bowling [Wed, 24 Nov 2010 02:09:08 +0000 (19:09 -0700)]
Reworked AIX __ss_family workaround to use AC_STRUCT_MEMBER.
Kevin Bowling [Tue, 23 Nov 2010 03:44:10 +0000 (20:44 -0700)]
select comes from <sys/select.h> according to POSIX.1-2001, or from a
variety of other standard headers on older systems, but not <select.h>.
AIX build fix.
Nick Mathewson [Wed, 24 Nov 2010 01:31:28 +0000 (20:31 -0500)]
Handle evhttp PUT/POST requests with an empty body
When we call evhttp_get_bodylen() [when transfer-encoding isn't set],
having req->ntoread == -1 means that we have no content-length. But a
request with no content-length has no body! We were treating the
absent content-length as meaning "read till closed", which only holds
for replies, not requests.
This patch also allows PATCH requests to have a body.
Nick Mathewson [Tue, 23 Nov 2010 18:08:07 +0000 (13:08 -0500)]
Remove _event_initialized(); make event_initialized() a function(); make it consistent on windows and non-windows
Nick Mathewson [Tue, 23 Nov 2010 17:26:46 +0000 (12:26 -0500)]
Document event_get_assignment
Nick Mathewson [Tue, 23 Nov 2010 17:26:34 +0000 (12:26 -0500)]
Note that reentrant calls to libevent from logging cbs may fail badly
Nick Mathewson [Tue, 23 Nov 2010 02:02:34 +0000 (21:02 -0500)]
Fix some irix compilation warnings spotted by Kevin Bowling
Nick Mathewson [Tue, 23 Nov 2010 01:24:03 +0000 (20:24 -0500)]
Merge remote branch 'kev009/master'
Kevin Bowling [Mon, 22 Nov 2010 23:40:31 +0000 (16:40 -0700)]
Fix IRIX build. sa_family collides with a #define in sys/socket.h on IRIX.
Nick Mathewson [Mon, 22 Nov 2010 21:24:52 +0000 (16:24 -0500)]
Merge remote branch 'github/20_getaddrinfo_cancel_v2'
Nick Mathewson [Mon, 22 Nov 2010 21:24:09 +0000 (16:24 -0500)]
Add a stress test for getaddrinfo_cancel
Nick Mathewson [Mon, 22 Nov 2010 20:52:34 +0000 (15:52 -0500)]
Merge remote branches 'github/20_epoll_nochangelist_v4', 'github/20_openssl_closeonfree' and 'github/20_cloexec'
Nick Mathewson [Mon, 22 Nov 2010 19:13:24 +0000 (14:13 -0500)]
Reorder backends in test.sh to match preference order in event.c
Nick Mathewson [Mon, 22 Nov 2010 19:10:01 +0000 (14:10 -0500)]
Make unit tests for epoll-with-changelist pass
The only changes needed were to handle the fact that the methodname
"epoll (with changelist)" matches the environment variable
EVENT_NOEPOLL rather than the imaginary "EVENT_EPOLL (WITH CHANGELIST)".
Nick Mathewson [Sun, 14 Nov 2010 22:52:16 +0000 (17:52 -0500)]
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 [Sat, 20 Nov 2010 06:41:34 +0000 (01:41 -0500)]
Make sure the CLOEXEC flag is set on fds we open for base notification
Nick Mathewson [Fri, 19 Nov 2010 22:09:30 +0000 (17:09 -0500)]
Resolve an evport bug in the thread/forking test
Nick Mathewson [Fri, 19 Nov 2010 17:14:18 +0000 (12:14 -0500)]
Make evdns_getaddrinfo_cancel threadsafe
Nick Mathewson [Fri, 19 Nov 2010 17:01:05 +0000 (12:01 -0500)]
Fix some more cancel-related bugs in getaddrinfo_async
Also imposed a new rule to make this much much simpler: no freeing
the getaddrinfo request until both dns callbacks have been invoked.
Nick Mathewson [Fri, 19 Nov 2010 16:33:48 +0000 (11:33 -0500)]
Avoid double-invocation of user callback with EVUTIL_EAI_CANCEL
Nick Mathewson [Tue, 16 Nov 2010 17:55:10 +0000 (12:55 -0500)]
Use the US-English "canceled", not the UK "cancelled".
Nick Mathewson [Wed, 17 Nov 2010 05:09:10 +0000 (00:09 -0500)]
Fix a memory leak in evhttp_uri_free.
Nick Mathewson [Mon, 15 Nov 2010 00:52:18 +0000 (19:52 -0500)]
Fix bug in bufferevent_connect on an openssl bufferevent that already had an fd
The problem was that we were using openssl's BIO code's shutdown flag
whenever BEV_OPT_CLOSE_ON_FREE was set. This made the BIO close the
socket when it was freed... but it would be freed whenever we did a
setfd on the bufferevent_openssl, even the no-op setfd in
bufferevent_connect.
So instead, we just set the shutdown flag to 0, and handle closing the
fd ourselves.
Spotted by Linus Nordberg
Nick Mathewson [Mon, 15 Nov 2010 00:34:49 +0000 (19:34 -0500)]
Clarify EVLOOP_* documentation to be more precise.
Nick Mathewson [Mon, 15 Nov 2010 00:32:13 +0000 (19:32 -0500)]
Do not let EVLOOP_ONCE exit the loop until all deferred callbacks have run
Nick Mathewson [Mon, 15 Nov 2010 00:25:54 +0000 (19:25 -0500)]
Make EVLOOP_ONCE ignore internal events
Merely getting an internal notification event from having an event
added or deleted from another thread should not cause
event_base_loop(base, EVLOOP_ONCE) to exit; previously, it did.
Nick Mathewson [Tue, 9 Nov 2010 20:18:59 +0000 (15:18 -0500)]
Only clear underlying callbacks when the user hasn't reset them.
Nick Mathewson [Tue, 9 Nov 2010 16:43:47 +0000 (11:43 -0500)]
When closing a filtering bufferevent, clear callbacks on the underlying bufferevent
Previously, if BEV_OPT_CLOSE_ON_FREE wasn't set on a
bufferevent_filter or a filtering bufferevent_openssl, when we went
to free the filtering bufferevent, we'd leave the underlying
bufferevent unchanged. That's not so good, since the callbacks are
set to activate stuff in the filtering bufferevent that we're about
to free. Instead, set all the callbacks to NULL.
Nick Mathewson [Tue, 9 Nov 2010 15:19:05 +0000 (10:19 -0500)]
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 [Tue, 9 Nov 2010 15:14:32 +0000 (10:14 -0500)]
Refactor http version parsing into a single function
Based on a suggestion by Chris Davis to make
evhttp_parse_response_line tolerate odd versions too.
Nick Mathewson [Tue, 9 Nov 2010 15:03:00 +0000 (10:03 -0500)]
Remove some debugging puts() calls from allow_methods test
Nick Mathewson [Thu, 4 Nov 2010 20:40:44 +0000 (15:40 -0500)]
Set SO_UPDATE_ACCEPT_CONTEXT on sockets from AcceptEx so that shutdown() can work
Based on patch (and lots of debugging work) by Kelly Brock.
Nick Mathewson [Thu, 4 Nov 2010 20:04:28 +0000 (16:04 -0400)]
Fix a mistake in http documentation found by Julien Blache
Nick Mathewson [Thu, 4 Nov 2010 18:05:08 +0000 (14:05 -0400)]
Never call evhttp_readcb while writing.
Felix Nawothnig [Tue, 1 Jun 2010 02:45:55 +0000 (04:45 +0200)]
Don't disable reading from the HTTP connection after sending the request to be notified of connection-close in time
Nick Mathewson [Thu, 4 Nov 2010 16:41:13 +0000 (12:41 -0400)]
Units test for unexpected evhttp methods.
Nick Mathewson [Thu, 4 Nov 2010 16:39:41 +0000 (12:39 -0400)]
evhttp: Return 501 when we get an unrecognized method, not 400.
Nick Mathewson [Thu, 4 Nov 2010 15:53:34 +0000 (11:53 -0400)]
Tweak interface for allowed methods
Felix Nawothnig [Thu, 4 Nov 2010 15:25:35 +0000 (11:25 -0400)]
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 [Wed, 3 Nov 2010 16:37:37 +0000 (12:37 -0400)]
Don't free evdns_request handles until after the callback is invoked
Previously, once the callback was scheduled, it was unsafe to cancel
a request, but there was no way to tell that. Now it is safe to
cancel a request until the callback is invoked, at which point it
isn't.
Found and diagnosed by Denis Bilenko.
Christopher Davis [Wed, 3 Nov 2010 21:38:45 +0000 (14:38 -0700)]
Fix more wn64 warnings.
Nick Mathewson [Wed, 3 Nov 2010 19:18:34 +0000 (15:18 -0400)]
Merge branch 'http_nolegacy_v2'
Nick Mathewson [Wed, 3 Nov 2010 19:17:57 +0000 (15:17 -0400)]
Remove need for http_compat.h in http tests
Nick Mathewson [Wed, 3 Nov 2010 19:14:29 +0000 (15:14 -0400)]
Stop accessing http request struct directly from in the unit tests.
Nick Mathewson [Wed, 3 Nov 2010 19:12:08 +0000 (15:12 -0400)]
Add evhttp_response_code to remove one more reason to include http_struct.h
Nick Mathewson [Wed, 3 Nov 2010 19:04:44 +0000 (15:04 -0400)]
Stop using event_compat.h in regress_http
Nick Mathewson [Wed, 3 Nov 2010 18:31:23 +0000 (14:31 -0400)]
Convert the rest of the http tests to be non-legacy unit tests.
Nick Mathewson [Wed, 3 Nov 2010 18:13:20 +0000 (14:13 -0400)]
Rename the confusing "base" static variable in regress_http.c
Nick Mathewson [Wed, 3 Nov 2010 17:55:20 +0000 (13:55 -0400)]
Start porting http tests to not use legacy interfaces
Nick Mathewson [Tue, 2 Nov 2010 19:19:12 +0000 (15:19 -0400)]
Replace exact-version checks for HTTP/1.1 with >= or < checks
Joachim Bauch [Tue, 2 Nov 2010 17:50:57 +0000 (13:50 -0400)]
reset "chunked" flag when sending non-chunked reply
Nick Mathewson [Tue, 2 Nov 2010 16:42:35 +0000 (12:42 -0400)]
Use the label_len local variable in evdns instead of recalculating it over and over
Nick Mathewson [Mon, 1 Nov 2010 18:23:33 +0000 (14:23 -0400)]
Fix win32 build in response to fixes from win64 build.
Nick Mathewson [Mon, 1 Nov 2010 18:16:39 +0000 (14:16 -0400)]
fix signed/unsigned warnings in http.c
Nick Mathewson [Mon, 1 Nov 2010 18:15:34 +0000 (14:15 -0400)]
Nick Mathewson [Mon, 1 Nov 2010 17:59:04 +0000 (13:59 -0400)]
Fix even more win64 warnings: buffer, event_tagging, http, evdns, evrpc
Nick Mathewson [Mon, 1 Nov 2010 17:43:43 +0000 (13:43 -0400)]
Fix even more win64 warnings
Nick Mathewson [Mon, 1 Nov 2010 15:48:57 +0000 (11:48 -0400)]
Rename "size" variables in win32select that were really fd counts.
Christopher Davis [Thu, 28 Oct 2010 17:11:25 +0000 (10:11 -0700)]
Increase the skew tolerance to 2 seconds in thread/deferred_cb_skew
This is to make the test not fail on Sebastian Hahn's Win7 box.
Christopher Davis [Thu, 28 Oct 2010 17:08:17 +0000 (10:08 -0700)]
Make sure IOCP evconnlistener uses virtual events.
Nick Mathewson [Thu, 28 Oct 2010 02:57:53 +0000 (22:57 -0400)]
Try to clear up more size_t vs int/long issues.