Nick Mathewson
ea0d019b71
Use AM_CONDITIONAL, not AC_SUBST, to tell automake to build regress
...
For some reason, this makes mingw much happier about building
regress.exe by default. No, I'm afraid I don't know why.
2011-04-23 02:35:17 -04:00
Nick Mathewson
dd68cce439
Add missing header for regress_http compilation on win32
2011-04-23 01:47:43 -04:00
Sebastian Hahn
646f9feb26
Zero a struct sockaddr_in before using it
...
Found by Dave Heart
2011-04-23 02:22:08 +02:00
Sebastian Hahn
93a1abb374
Check return value of evbuffer_add_cb in tests
...
Caught by clang's static analyzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
48c44a6dda
Refactor test_getaddrinfo_async_cancel_stress()
...
Turns out it didn't need an event base set up.
Spotted by clang's static anaylzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
b693c324ca
Actually send NULL request in http_bad_request_test
...
Issue caught by clang's static analyzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
3819b62cea
Add a forgotten return value check in the unit tests
...
Spotted by clang's static analyzer
2011-04-23 02:04:58 +02:00
Sebastian Hahn
3f79a3a01a
Continue AM_CFLAGS to AM_CPPFLAGS correction
...
9c469db300e1b270a93c6b04c1709ac0f7751136 had started with the conversion
but left out another instance of incorrectly used AM_CFLAGS.
Dave Hart provided the suggestion for this fix.
2011-02-23 12:17:08 +01:00
Nick Mathewson
5dc200b7c8
Merge branch '20_uri_nonconformant' into patches-2.0
2011-02-22 18:53:55 -05:00
Nick Mathewson
15b2408c9b
Use $(), not @@, for LIBEVENT_GC_SECTIONS
2011-02-22 16:13:49 -05:00
Nick Mathewson
039b9bd0e3
Use %s with printf in test.sh
2011-02-22 00:31:56 -05:00
Dave Hart
9c469db300
Correct an AM_CFLAGS to an AM_CPPFLAGS in test/Makefile.am
2011-02-22 00:29:12 -05:00
Dave Hart
49e9bb7fb0
Add configure options to disable installation, regression tests
...
The main reason for disabling installation is if you're building
libevent as a subpackage for embedding: you want to have your main
package's "make all" build libevent, but you don't want your main
package's "make install" to install libevent.
2011-02-22 00:28:37 -05:00
Dave Hart
0965c56356
Use the gcc -ffunction-segments feature to allow gc when linking with static libevent
2011-02-22 00:25:58 -05:00
Harlan Stenn
05a2c22fee
Make test-eof fail with a timeout if we never get an eof.
...
Previously, it would just wait forever.
2011-02-22 00:25:12 -05:00
Harlan Stenn
bbf55150b6
Include util-internal.h as needed to build on platforms with no sockaddr_storage
2011-02-22 00:24:54 -05:00
Harlan Stenn
10c834c4df
Include arpa/inet.h as needed on HPUX
2011-02-22 00:24:36 -05:00
Nick Mathewson
95060b54fe
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.
2011-02-13 00:41:22 -05:00
Dave Hart
b4f89b608a
Fix test.sh output on solaris
...
Solaris echo -n doesn't omit newlines, but printf omits newlines in
more places.
2011-02-01 02:09:49 -05:00
Nick Mathewson
6092f1265f
Fix http unit test on non-windows platforms without getaddrinfo
2011-01-31 16:37:27 -05:00
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