]> granicus.if.org Git - libevent/log
libevent
13 years agoMake URI parser able to tolerate nonconformant URIs.
Nick Mathewson [Sun, 13 Feb 2011 05:41:22 +0000 (00:41 -0500)]
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.

13 years agoFix a type error in our (unused) arc4random_stir()
Nick Mathewson [Wed, 9 Feb 2011 03:24:06 +0000 (22:24 -0500)]
Fix a type error in our (unused) arc4random_stir()

13 years agoFix warnings about AC_LANG_PROGRAM usage
Sebastian Hahn [Thu, 14 Oct 2010 18:15:04 +0000 (20:15 +0200)]
Fix warnings about AC_LANG_PROGRAM usage

Autoconf 2.68 introduced some new warnings that were triggered during
autogen.sh. Fix those.

13 years agoFix test.sh output on solaris
Dave Hart [Tue, 1 Feb 2011 06:15:48 +0000 (01:15 -0500)]
Fix test.sh output on solaris

Solaris echo -n doesn't omit newlines, but printf omits newlines in
more places.

13 years agoDo not check for gethostbyname_r versions if we have getaddrinfo
Nick Mathewson [Mon, 31 Jan 2011 22:36:49 +0000 (17:36 -0500)]
Do not check for gethostbyname_r versions if we have getaddrinfo

13 years agoAdd compile-time check for AF_UNSPEC==PF_UNSPEC
Nick Mathewson [Mon, 31 Jan 2011 21:44:06 +0000 (16:44 -0500)]
Add compile-time check for AF_UNSPEC==PF_UNSPEC

13 years agoFix http unit test on non-windows platforms without getaddrinfo
Nick Mathewson [Mon, 31 Jan 2011 21:37:27 +0000 (16:37 -0500)]
Fix http unit test on non-windows platforms without getaddrinfo

13 years agoBuild on systems without AI_PASSIVE
Nick Mathewson [Mon, 31 Jan 2011 21:32:05 +0000 (16:32 -0500)]
Build on systems without AI_PASSIVE

13 years agoTry to build correctly on platforms with no IPv6 support
Nick Mathewson [Mon, 24 Jan 2011 23:55:10 +0000 (18:55 -0500)]
Try to build correctly on platforms with no IPv6 support

13 years agoBuild correctly on platforms without sockaddr_storage
Nick Mathewson [Mon, 24 Jan 2011 23:29:20 +0000 (18:29 -0500)]
Build correctly on platforms without sockaddr_storage

13 years agoFall back to sscanf if we have no other way to implement strtoll
Nick Mathewson [Mon, 24 Jan 2011 23:22:32 +0000 (18:22 -0500)]
Fall back to sscanf if we have no other way to implement strtoll

13 years agoMake --enable-gcc-warnings a no-op if not using gcc
Nick Mathewson [Mon, 24 Jan 2011 22:42:23 +0000 (17:42 -0500)]
Make --enable-gcc-warnings a no-op if not using gcc

13 years agoCorrectly free selectop fields when select_resize fails in select_init
Nick Mathewson [Thu, 13 Jan 2011 01:28:47 +0000 (20:28 -0500)]
Correctly free selectop fields when select_resize fails in select_init

13 years agoHandle resize failures in the select backend better.
Nick Mathewson [Fri, 7 Jan 2011 18:18:09 +0000 (13:18 -0500)]
Handle resize failures in the select backend better.

13 years agoUse event_err() only if the failure is truly unrecoverable.
Jardel Weyrich [Sat, 18 Dec 2010 04:40:22 +0000 (02:40 -0200)]
Use event_err() only if the failure is truly unrecoverable.

13 years agoDetect and handle more allocation failures.
Jardel Weyrich [Sat, 18 Dec 2010 03:07:27 +0000 (01:07 -0200)]
Detect and handle more allocation failures.

13 years agoCheck for POLLERR, POLLHUP and POLLNVAL for Solaris event ports
Trond Norbye [Sun, 2 Jan 2011 09:17:15 +0000 (10:17 +0100)]
Check for POLLERR, POLLHUP and POLLNVAL for Solaris event ports

13 years agoFix compilation on Windows with NDEBUG
Nick Mathewson [Sun, 2 Jan 2011 02:37:21 +0000 (21:37 -0500)]
Fix compilation on Windows with NDEBUG

Dongsheng Song reports that when building on windows with NDEBUG, you
run into an attempt to do EVUTIL_ASSERT(x) where x is a bitfield,
which turns into _EVUTIL_NIL_CONDITION(x), which takes sizeof(x),
which is illegal.  This patch fixes _EVUTIL_NIL_CONDITION to work on
bitfields too.

14 years agoBump version to 2.0.10-stable-dev
Nick Mathewson [Thu, 16 Dec 2010 17:57:23 +0000 (12:57 -0500)]
Bump version to 2.0.10-stable-dev

14 years agoAdd changelog for 2.0.10-stable release-2.0.10-stable
Nick Mathewson [Wed, 15 Dec 2010 19:31:08 +0000 (14:31 -0500)]
Add changelog for 2.0.10-stable

14 years agoAdd more acknowledgements to the readme for 2.0.10-stable
Nick Mathewson [Wed, 15 Dec 2010 19:30:04 +0000 (14:30 -0500)]
Add more acknowledgements to the readme for 2.0.10-stable

14 years agoSet the version to 2.0.10-stable
Nick Mathewson [Wed, 15 Dec 2010 19:29:50 +0000 (14:29 -0500)]
Set the version to 2.0.10-stable

14 years agoEVUTIL_ASSERT: Use sizeof() to avoid "unused variable" warnings.
Evan Jones [Mon, 6 Dec 2010 19:17:44 +0000 (14:17 -0500)]
EVUTIL_ASSERT: Use sizeof() to avoid "unused variable" warnings.

14 years agoAdd stuff to whatsnew based on reading include changes since August.
Nick Mathewson [Thu, 9 Dec 2010 17:17:58 +0000 (12:17 -0500)]
Add stuff to whatsnew based on reading include changes since August.

14 years agoDocument that the cpu_hint is only used on Windows with IOCP for now
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

14 years agoConsistentize tabs
Nick Mathewson [Thu, 9 Dec 2010 16:47:54 +0000 (11:47 -0500)]
Consistentize tabs

14 years agoRemove end-of-line whitespace
Nick Mathewson [Thu, 9 Dec 2010 16:43:12 +0000 (11:43 -0500)]
Remove end-of-line whitespace

14 years agotweak readme, whatsnew
Nick Mathewson [Thu, 9 Dec 2010 16:40:35 +0000 (11:40 -0500)]
tweak readme, whatsnew

14 years agoFix a signed/unsigned comparison in the last commit
Nick Mathewson [Tue, 7 Dec 2010 16:45:14 +0000 (11:45 -0500)]
Fix a signed/unsigned comparison in the last commit

14 years agoReject overlong http requests early when Expect:100-continue is set
Constantine Verutin [Tue, 7 Dec 2010 16:43:52 +0000 (11:43 -0500)]
Reject overlong http requests early when Expect:100-continue is set

14 years agotests: Use relative includes ("") instead of system includes (<>)
Evan Jones [Thu, 2 Dec 2010 19:13:33 +0000 (14:13 -0500)]
tests: Use relative includes ("") instead of system includes (<>)

14 years agotests: Use new event2 headers instead of old compatibility headers.
Evan Jones [Thu, 2 Dec 2010 19:09:52 +0000 (14:09 -0500)]
tests: Use new event2 headers instead of old compatibility headers.

14 years agoUse relative includes instead of system includes consistently.
Evan Jones [Thu, 2 Dec 2010 15:26:12 +0000 (10:26 -0500)]
Use relative includes instead of system includes consistently.

14 years agobufferevent-internal.h: Use the new event2/util.h header, not evutil.h
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

14 years agoCorrectly notify the main thread when activating an event from a subthread
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

14 years agoMinor fix for IOCP shutdown handling fix
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.

14 years agoIncrement version to 2.0.9-rc-dev
Nick Mathewson [Tue, 30 Nov 2010 07:19:25 +0000 (02:19 -0500)]
Increment version to 2.0.9-rc-dev

14 years agoGive the correct date for 2.0.9-rc in the changelog release-2.0.9-rc
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

14 years agoIncrement version to 2.0.9-rc
Nick Mathewson [Tue, 23 Nov 2010 16:17:24 +0000 (11:17 -0500)]
Increment version to 2.0.9-rc

14 years agoBump VERSION_INFO to 5:0:0
Nick Mathewson [Tue, 23 Nov 2010 16:17:06 +0000 (11:17 -0500)]
Bump VERSION_INFO to 5:0:0

14 years agoChangelog and acknowledgments for 2.0.9-rc
Nick Mathewson [Tue, 23 Nov 2010 16:08:30 +0000 (11:08 -0500)]
Changelog and acknowledgments for 2.0.9-rc

14 years agoFix win32 build of http-server.c with unicode enabled
Nick Mathewson [Tue, 30 Nov 2010 05:53:16 +0000 (00:53 -0500)]
Fix win32 build of http-server.c with unicode enabled

14 years agoCorrectly detect timeouts during http connects
Nick Mathewson [Tue, 30 Nov 2010 05:05:54 +0000 (00:05 -0500)]
Correctly detect timeouts during http connects

14 years agoTry to fix an assertion failure related to close detection
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.

14 years agoPossible crash fix when freeing an underlying bufferevent of an openssl bufferevent
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

14 years agoMerge remote branch 'chrisd/http_continue'
Nick Mathewson [Tue, 30 Nov 2010 02:56:23 +0000 (21:56 -0500)]
Merge remote branch 'chrisd/http_continue'

14 years agoPreliminary support for Continue expectation in evhttp.
Christopher Davis [Tue, 30 Nov 2010 02:25:04 +0000 (18:25 -0800)]
Preliminary support for Continue expectation in evhttp.

14 years agomake http-server example code build on win32
Nick Mathewson [Tue, 30 Nov 2010 01:39:09 +0000 (20:39 -0500)]
make http-server example code build on win32

14 years agoFix http-server.c compilation on freebsd
Nick Mathewson [Tue, 30 Nov 2010 01:13:19 +0000 (20:13 -0500)]
Fix http-server.c compilation on freebsd

14 years agoMerge remote branch 'chrisd/http_fixes2'
Nick Mathewson [Mon, 29 Nov 2010 19:25:33 +0000 (14:25 -0500)]
Merge remote branch 'chrisd/http_fixes2'

14 years agoAdd a few more comments.
Christopher Davis [Mon, 29 Nov 2010 15:18:32 +0000 (07:18 -0800)]
Add a few more comments.

14 years agoadd http-server to gitignore
Nick Mathewson [Fri, 26 Nov 2010 18:29:56 +0000 (13:29 -0500)]
add http-server to gitignore

14 years agoFix a misplaced ) in http_server.c
Nick Mathewson [Fri, 26 Nov 2010 18:28:48 +0000 (13:28 -0500)]
Fix a misplaced ) in http_server.c

14 years agoMerge branch '20_empty_body'
Nick Mathewson [Fri, 26 Nov 2010 17:59:02 +0000 (12:59 -0500)]
Merge branch '20_empty_body'

14 years agoAdd a basic example of how to write a static HTTP server.
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.

14 years agoAdd evhttp server alias interface, correct flagging of proxy requests.
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.

14 years agoMerge remote branch 'github/20_once_fixes'
Nick Mathewson [Fri, 26 Nov 2010 04:03:46 +0000 (23:03 -0500)]
Merge remote branch 'github/20_once_fixes'

14 years agoFix snprintf related failures on IRIX.
Kevin Bowling [Wed, 24 Nov 2010 02:40:23 +0000 (19:40 -0700)]
Fix snprintf related failures on IRIX.

14 years agoIf not WIN32, include <sys/socket.h> in event2/util.h.
Kevin Bowling [Wed, 24 Nov 2010 02:26:34 +0000 (19:26 -0700)]
If not WIN32, include <sys/socket.h> in event2/util.h.

14 years agoxlC doesn't obey C99 comments here. autoconf isn't invoking full C99
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.

14 years agoAdd some checks since lack of TAILQ_FOREACH doesn't imply lack of FIRST,
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.

14 years agoReworked AIX __ss_family workaround to use AC_STRUCT_MEMBER.
Kevin Bowling [Wed, 24 Nov 2010 02:09:08 +0000 (19:09 -0700)]
Reworked AIX __ss_family workaround to use AC_STRUCT_MEMBER.

14 years agoselect comes from <sys/select.h> according to POSIX.1-2001, or from a
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.

14 years agoHandle evhttp PUT/POST requests with an empty body
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.

14 years agoRemove _event_initialized(); make event_initialized() a function(); make it consisten...
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

14 years agoDocument event_get_assignment
Nick Mathewson [Tue, 23 Nov 2010 17:26:46 +0000 (12:26 -0500)]
Document event_get_assignment

14 years agoNote that reentrant calls to libevent from logging cbs may fail badly
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

14 years agoFix some irix compilation warnings spotted by Kevin Bowling
Nick Mathewson [Tue, 23 Nov 2010 02:02:34 +0000 (21:02 -0500)]
Fix some irix compilation warnings spotted by Kevin Bowling

14 years agoMerge remote branch 'kev009/master'
Nick Mathewson [Tue, 23 Nov 2010 01:24:03 +0000 (20:24 -0500)]
Merge remote branch 'kev009/master'

14 years agoFix IRIX build. sa_family collides with a #define in sys/socket.h on IRIX.
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.

14 years agoMerge remote branch 'github/20_getaddrinfo_cancel_v2'
Nick Mathewson [Mon, 22 Nov 2010 21:24:52 +0000 (16:24 -0500)]
Merge remote branch 'github/20_getaddrinfo_cancel_v2'

14 years agoAdd a stress test for getaddrinfo_cancel
Nick Mathewson [Mon, 22 Nov 2010 21:24:09 +0000 (16:24 -0500)]
Add a stress test for getaddrinfo_cancel

14 years agoMerge remote branches 'github/20_epoll_nochangelist_v4', 'github/20_openssl_closeonfr...
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'

14 years agoReorder backends in test.sh to match preference order in event.c
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

14 years agoMake unit tests for epoll-with-changelist pass
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)".

14 years agoDisable changelist for epoll by default because of Linux dup() bug; add an option...
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

14 years agoMake sure the CLOEXEC flag is set on fds we open for base notification
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

14 years agoResolve an evport bug in the thread/forking test
Nick Mathewson [Fri, 19 Nov 2010 22:09:30 +0000 (17:09 -0500)]
Resolve an evport bug in the thread/forking test

14 years agoMake evdns_getaddrinfo_cancel threadsafe
Nick Mathewson [Fri, 19 Nov 2010 17:14:18 +0000 (12:14 -0500)]
Make evdns_getaddrinfo_cancel threadsafe

14 years agoFix some more cancel-related bugs in getaddrinfo_async
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.

14 years agoAvoid double-invocation of user callback with EVUTIL_EAI_CANCEL
Nick Mathewson [Fri, 19 Nov 2010 16:33:48 +0000 (11:33 -0500)]
Avoid double-invocation of user callback with EVUTIL_EAI_CANCEL

14 years agoUse the US-English "canceled", not the UK "cancelled".
Nick Mathewson [Tue, 16 Nov 2010 17:55:10 +0000 (12:55 -0500)]
Use the US-English "canceled", not the UK "cancelled".

14 years agoFix a memory leak in evhttp_uri_free.
Nick Mathewson [Wed, 17 Nov 2010 05:09:10 +0000 (00:09 -0500)]
Fix a memory leak in evhttp_uri_free.

14 years agoFix bug in bufferevent_connect on an openssl bufferevent that already had an fd
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

14 years agoClarify EVLOOP_* documentation to be more precise.
Nick Mathewson [Mon, 15 Nov 2010 00:34:49 +0000 (19:34 -0500)]
Clarify EVLOOP_* documentation to be more precise.

14 years agoDo not let EVLOOP_ONCE exit the loop until all deferred callbacks have run
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

14 years agoMake EVLOOP_ONCE ignore internal events
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.

14 years agoOnly clear underlying callbacks when the user hasn't reset them.
Nick Mathewson [Tue, 9 Nov 2010 20:18:59 +0000 (15:18 -0500)]
Only clear underlying callbacks when the user hasn't reset them.

14 years agoWhen closing a filtering bufferevent, clear callbacks on the underlying bufferevent
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.

14 years agoMerge remote branches 'github/20_evdns_cancel_segfault_v2', 'github/20_http_close_det...
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'

14 years agoRefactor http version parsing into a single function
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.

14 years agoRemove some debugging puts() calls from allow_methods test
Nick Mathewson [Tue, 9 Nov 2010 15:03:00 +0000 (10:03 -0500)]
Remove some debugging puts() calls from allow_methods test

14 years agoSet SO_UPDATE_ACCEPT_CONTEXT on sockets from AcceptEx so that shutdown() can work
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.

14 years agoFix a mistake in http documentation found by Julien Blache
Nick Mathewson [Thu, 4 Nov 2010 20:04:28 +0000 (16:04 -0400)]
Fix a mistake in http documentation found by Julien Blache

14 years agoNever call evhttp_readcb while writing.
Nick Mathewson [Thu, 4 Nov 2010 18:05:08 +0000 (14:05 -0400)]
Never call evhttp_readcb while writing.

14 years agoDon't disable reading from the HTTP connection after sending the request to be notifi...
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

14 years agoUnits test for unexpected evhttp methods.
Nick Mathewson [Thu, 4 Nov 2010 16:41:13 +0000 (12:41 -0400)]
Units test for unexpected evhttp methods.

14 years agoevhttp: Return 501 when we get an unrecognized method, not 400.
Nick Mathewson [Thu, 4 Nov 2010 16:39:41 +0000 (12:39 -0400)]
evhttp: Return 501 when we get an unrecognized method, not 400.

14 years agoTweak interface for allowed methods
Nick Mathewson [Thu, 4 Nov 2010 15:53:34 +0000 (11:53 -0400)]
Tweak interface for allowed methods

14 years agoDefine enumerators for all HTTP methods, including PATCH from RFC5789
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.