Nick Mathewson
22f4af6580
Remove end-of-line whitespace
2010-12-09 11:43:12 -05:00
Constantine Verutin
d23839fc6e
Reject overlong http requests early when Expect:100-continue is set
2010-12-07 11:43:52 -05:00
Evan Jones
c0bf63cecb
tests: Use relative includes ("") instead of system includes (<>)
2010-12-03 12:57:15 -05:00
Evan Jones
4f332091c3
tests: Use new event2 headers instead of old compatibility headers.
2010-12-03 12:57:15 -05:00
Christopher Davis
fa9305f8f5
Preliminary support for Continue expectation in evhttp.
2010-11-29 18:25:04 -08:00
Christopher Davis
aab8c38b76
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.
2010-11-26 03:58:28 -08:00
Kevin Bowling
c2e5e22c4c
xlC doesn't obey C99 comments here. autoconf isn't invoking full C99
...
mode.
2010-11-23 22:24:23 -05:00
Nick Mathewson
7bcace2d54
Fix some irix compilation warnings spotted by Kevin Bowling
2010-11-22 21:02:34 -05:00
Nick Mathewson
150d7d0a49
Merge remote branch 'kev009/master'
2010-11-22 20:24:03 -05:00
Kevin Bowling
e87498231c
Fix IRIX build. sa_family collides with a #define in sys/socket.h on IRIX.
2010-11-22 16:40:31 -07:00
Nick Mathewson
26049c2f93
Merge remote branch 'github/20_getaddrinfo_cancel_v2'
2010-11-22 16:24:52 -05:00
Nick Mathewson
da1bf52811
Add a stress test for getaddrinfo_cancel
2010-11-22 16:24:09 -05:00
Nick Mathewson
ece974fbba
Reorder backends in test.sh to match preference order in event.c
2010-11-22 15:51:45 -05:00
Nick Mathewson
aed7e02979
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)".
2010-11-22 15:51:45 -05:00
Nick Mathewson
3a67d0bf42
Resolve an evport bug in the thread/forking test
2010-11-19 17:09:30 -05:00
Nick Mathewson
5c8a59e886
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'
2010-11-09 10:19:05 -05:00
Nick Mathewson
3db6bc0079
Remove some debugging puts() calls from allow_methods test
2010-11-09 10:03:00 -05:00
Nick Mathewson
75e3320efd
Units test for unexpected evhttp methods.
2010-11-04 12:41:13 -04:00
Christopher Davis
34b84b9727
Fix more wn64 warnings.
2010-11-03 23:30:29 -04:00
Nick Mathewson
985430aed1
Remove need for http_compat.h in http tests
2010-11-03 15:17:57 -04:00
Nick Mathewson
0b137f452e
Stop accessing http request struct directly from in the unit tests.
2010-11-03 15:14:29 -04:00
Nick Mathewson
c91622d18c
Stop using event_compat.h in regress_http
2010-11-03 15:04:44 -04:00
Nick Mathewson
9bb8239375
Convert the rest of the http tests to be non-legacy unit tests.
2010-11-03 15:00:08 -04:00
Nick Mathewson
353402a87a
Rename the confusing "base" static variable in regress_http.c
2010-11-03 14:13:20 -04:00
Nick Mathewson
8505a7449c
Start porting http tests to not use legacy interfaces
2010-11-03 14:11:45 -04:00
Nick Mathewson
7484df61c9
Fix even more win64 warnings
2010-11-01 13:43:43 -04:00
Christopher Davis
f8064762ae
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.
2010-10-28 14:11:33 -04:00
Dimitre Piskyulev
f817bfa4d3
Fix some ints to evutil_socket_t; make tests pass on win64.
2010-10-27 17:32:06 -04:00
Nick Mathewson
5d389dc0f0
Fix some uses of int for socket in regress
2010-10-26 22:27:57 -04:00
Nick Mathewson
c281aba30e
Fix a nasty bug related to use of dup() with epoll on Linux
...
Current versions of the Linux kernel don't seem to remove the struct
epitem for a given (file,fd) combo when the fd is closed unless the
file itself is also completely closed. This means that if you do:
fd = dup(fd_orig);
add(fd);
close(fd);
dup2(fd_orig, fd);
add(fd);
you will get an EEXIST when you should have gotten a success. This
could cause warnings and dropped events when using dup and epoll.
The solution is pretty simple: when we get an EEXIST from
EPOLL_CTL_ADD, we retry with EPOLL_CTL_MOD.
Unit test included to demonstrate the bug.
Found due to the patient efforts of Gilad Benjamini; diagnosed with
help from Nicholas Marriott.
2010-10-24 11:38:29 -04:00
Nick Mathewson
bf11e7ddf7
Merge branch 'http_uri_parse'
2010-10-21 15:33:13 -04:00
Nick Mathewson
bc98f5e6ba
Unit tests for evhttp_uri_set*
2010-10-21 14:53:21 -04:00
Nick Mathewson
45f6869c75
Make evhttp_uri non-public, and give it accessor functions.
2010-10-21 14:52:52 -04:00
Nick Mathewson
d9ffa899fa
Update the HTTP regression tests to use Libevent2 apis for non-http stuff
2010-10-21 13:04:04 -04:00
Nick Mathewson
1f507d7541
Stop using Libevent-1 headers in regress_http
2010-10-21 12:27:16 -04:00
Nick Mathewson
cd00079b22
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
2010-10-21 12:19:28 -04:00
Nick Mathewson
a5a76e689c
Add a huge pile of tests for the new URI functions, and make them pass.
2010-10-19 12:35:50 -04:00
Nick Mathewson
ad923a11f1
Improvements to tinytest_macros.h
...
First, handle cases where we have %s in a tt_want or tt_assert.
Second, add tt_want_*_op that do a tt_*_op test, but do not exit the
test on failure.
We should push these upstream to tinytest some time.
2010-10-19 12:33:50 -04:00
Nick Mathewson
eaa5f1d9ed
Revise evhttp_uri_parse implementation to handle more of RFC3986
2010-10-19 11:26:59 -04:00
Pavel Plesov
86dd720a66
Introduce absolute URI parsing helpers.
...
See evhttp_uri_parse(), evhttp_uri_free() and evhttp_uri_join() for details.
2010-10-18 14:30:29 -04:00
Nick Mathewson
f13e449b53
Merge branch 'http_parse'
2010-10-18 14:20:06 -04:00
Nick Mathewson
e5870690fc
Modernize header usage in bench_http.c
2010-10-18 13:53:31 -04:00
Nick Mathewson
4ebf9509f7
Fixes for MSVC compilation
2010-10-14 14:40:40 -04:00
Nick Mathewson
e06f514d4e
Fix signed/unsigned warnings on win32
2010-10-14 13:51:24 -04:00
Nick Mathewson
e5c214a423
Fix -Wsigned-compare warnings in test/*
2010-10-14 13:16:41 -04:00
Nick Mathewson
02f6259fc3
New unit test for ssl bufferevents starting with connected SSLs.
2010-10-14 12:17:28 -04:00
Nick Mathewson
34331e456d
The corrected bufferevent filter semantics let us fix our openssl tests
2010-10-14 10:55:04 -04:00
Nick Mathewson
a8148cedcd
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.
2010-10-08 23:58:00 -04:00
Christopher Davis
62b429afa8
Make iocp/listener/error work; don't accept again if lev is disabled.
2010-10-07 18:11:38 -04:00
Nick Mathewson
127d4f2195
Add a LEV_OPT_THREADSAFE option for threadsafe evconnlisteners
2010-10-07 18:11:19 -04:00