Azat Khuzhin
3166765903
test/http: avoid huge stack allocations to fix win32 builds
...
Since according to [DOC] default stack size is 1MB, so let's use dynamic
allocations instead of changing defaults.
DOC: https://msdn.microsoft.com/en-us/library/8cxs58a6.aspx
Not-fixes: http/data_length_constraints
Fixes: http/lingering_close
Fixes: http/non_lingering_close
Fixes: https://ci.appveyor.com/project/nmathewson/libevent/build/2.1.5.213
2016-03-10 20:01:55 +03:00
Azat Khuzhin
e122ca1eed
test: http/lingering_close: cover EVHTTP_SERVER_LINGERING_CLOSE
2016-03-09 18:52:52 +03:00
Azat Khuzhin
f41e1b016f
test: http/non_lingering_close: cover ~EVHTTP_SERVER_LINGERING_CLOSE
2016-03-09 18:52:52 +03:00
Azat Khuzhin
addf2b90ae
test: http/*: update expected HTTP codes for body exceeds max_body_size
2016-03-09 18:52:52 +03:00
Azat Khuzhin
d38a723974
test: http/data_length_constrains: set EVHTTP_CON_READ_ON_WRITE_ERROR
2016-03-09 18:52:52 +03:00
Azat Khuzhin
0792e1e7a7
test: increase buffer size for http/data_length_constraints to trigger EPIPE
...
With greater buffer it can't be written with one writev(2), and hence we can
trigger more tricky cases, like calling writecb/readcb more then once.
Refs: #321
2016-03-09 01:12:50 +03:00
Azat Khuzhin
23c77b6054
test/http: write_during_read for https
2015-11-18 15:40:47 +03:00
Azat Khuzhin
7ea26f71b8
test/http: connection_fail for https
2015-11-18 15:40:47 +03:00
Azat Khuzhin
ac04968311
test/http: stream_out for https
2015-11-18 15:40:47 +03:00
Azat Khuzhin
a71ffb9d1b
test/http: chunk_out for https
2015-11-18 15:39:08 +03:00
Azat Khuzhin
3160716f26
test/regress: fix ssl-less builds (need to make this prettier)
...
CI: https://travis-ci.org/libevent/libevent/jobs/89590839
2015-11-06 10:21:04 +03:00
Azat Khuzhin
1ede3262cc
test/http: allow dirty shutdown for ssl to fix https_incomplete
2015-11-06 09:43:25 +03:00
Azat Khuzhin
59714b46bc
test/http: https basic
2015-11-06 09:43:25 +03:00
Azat Khuzhin
615490d048
test/http: incomplete{,_timeout} for https
2015-11-06 09:42:44 +03:00
Azat Khuzhin
93b19dc569
test/http: add simplest test for http/https/https_dirty_shutdown
...
There is "basic" before, but it uses bufferevent's for creating requests for
http layer, while this test uses http layer for client requests too.
2015-11-06 09:42:43 +03:00
Azat Khuzhin
7c2d24ae6b
test/http: https: retry coverage
2015-11-06 09:42:43 +03:00
Azat Khuzhin
a7088ad095
test/http: https server support (plus some helpers)
...
TODO:
- check BEV_OPT_DEFER_CALLBACKS separately
2015-11-06 09:42:28 +03:00
Azat Khuzhin
a27c53c531
test/http: more sanity checks
2015-11-06 09:29:31 +03:00
Azat Khuzhin
cd422e0927
test/regress_http: fix compilation warnings (-Wmissing-field-initializers)
2015-10-09 01:50:05 +03:00
Azat Khuzhin
6f6fa0d28a
test/regress_http: cover evhttp_request_own()
2015-09-09 19:15:18 +03:00
Azat Khuzhin
3d15aeb4fd
test/regress_http: cover write during read
...
This is the regression for evhttp_write_buffer() where we reset readcb to avoid
illegal state:
http/write_during_read: [err] evhttp_read_cb: illegal connection state 7
If you will comment that this test will fail.
2015-09-09 18:06:37 +03:00
Azat Khuzhin
4be6c70bb0
test/regress_http: verify that closecb will be called without multiple write
...
And now this works incorrect, i.e. http layer will not detect EOF until another
write.
Reported-in: #78
2015-09-08 16:43:05 +03:00
Ed Schouten
fd36647af1
Don't use BSD u_* types.
...
These types are not part of POSIX. As we only use them in a small number
of places, we'd better replace them by C standard types. This makes a
larger part of the code build for CloudABI.
2015-08-25 19:15:50 +03:00
Azat Khuzhin
9f0bff3f68
test/regress_http: initialize "dns_base" to avoid reading trash
...
Even though it is very unlikely, but it will better to fix this.
2015-08-18 21:32:03 +03:00
Azat Khuzhin
a50f5f0ac0
http: reuse connected address only with EVHTTP_CON_REUSE_CONNECTED_ADDR
2015-08-18 20:06:53 +03:00
Azat Khuzhin
f4874d8c1f
test/http: cover retrying with saved conn_address by shutting down dns server
2015-08-18 20:06:52 +03:00
John Ohl
b0e99244ce
Add test for evhttp_connection_free_on_completion
2014-10-29 03:40:44 -04:00
Nick Mathewson
89c1a3b7fe
Fix several memory leaks in the unit tests.
...
Also add a comment to buffer.c about why we call
evbuffer_file_segment_free on failure to add the segment.
2014-09-18 12:40:38 -04:00
Nick Mathewson
c119f2416c
Fix a dead-code warning in unit tests. CID 1193548
2014-09-18 11:54:04 -04:00
Nick Mathewson
73615a3723
Merge pull request #118 from azat/http-forward-family-to-bufferevent
...
Add evhttp_connection_set_family() to set addrinfo->family for DNS requests
2014-09-18 11:31:52 -04:00
Azat Khuzhin
3fbf3cc908
test/http: add regress test for set family to AF_INET6
2014-03-27 00:50:04 +04:00
Azat Khuzhin
42aefeb0af
test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC
2014-03-27 00:50:04 +04:00
Azat Khuzhin
177b8a7ce8
test: add family argument for http_connection_test_()
2014-03-27 00:49:58 +04:00
Nick Mathewson
6a1c4d501b
Correctly skip ipv6 http test on systems without ipv6
2014-03-18 18:36:32 -04:00
Nick Mathewson
2578ec14f5
Avoid double-close paths in http tests
...
Coverity spotted that there were some paths through the test
functions that would double-close some sockets.
2014-03-13 10:46:59 -04:00
Nick Mathewson
21477e408f
Skip http/ipv6_for_domain test when we have no ipv6 support
2014-03-12 18:13:19 -04:00
Nick Mathewson
d240328d60
Fix even more coverity warnings.
2014-01-08 13:02:37 -05:00
Nick Mathewson
860767e841
Fix a couple of compilation warnings in regress_http.c
2014-01-08 12:46:09 -05:00
Nick Mathewson
867f401f9b
Fix a pile of coverity warnings in the unit tests
...
Most of these problems can only trigger when the tests fail, but it's
good hygiene to keep the code warning-free in any case.
2014-01-08 11:51:22 -05:00
Andrew Sweeney
b85f398704
Update unit test to make sure that the callback happens after the output data is written
2014-01-06 21:19:15 -05:00
Andrew Sweeney
b083ca0551
Provide on request complete callback facility
...
This patch provides the ability to receive a callback on the completion of a
request. The callback takes place immediately before the request's resources
are released.
2014-01-05 20:35:46 -05:00
Azat Khuzhin
4dd500cdf4
regress_http: add tests for evhttp_connection_get_addr()
2013-10-14 11:22:30 -04:00
Maxime Henrion
fbc323b76b
Add checks for evhttp_connection_get_server() in unit tests.
...
They validate that this function behave as expected; that is, it returns
NULL for outgoing connections, and returns the HTTP server object that
received the connection for incoming ones.
2013-07-31 21:55:19 -04:00
Nick Mathewson
5bc290e247
Make http/connection_retry off-by-default
2013-05-01 10:04:08 -04:00
Azat Khuzhin
54cc800536
Drop extra header http_struct.h from regress_http.c
2013-04-25 15:12:20 -04:00
Azat Khuzhin
862c217a29
Add test for EVREQ_HTTP_REQUEST_CANCEL into http_cancel_test()
2013-04-25 15:12:20 -04:00
Azat Khuzhin
7b077194cc
Add new error_cb for actual reporting of HTTP request errors.
...
It is useful to know why you callback called with NULL (i.e. it failed),
for example if you set max_body with evhttp_connection_set_max_body_size()
you must know that it failed because of body was longer than this size.
(Commit message tweaked by Nick)
2013-04-25 15:11:44 -04:00
Azat Khuzhin
13676535c8
Test: decoding just part of string with evhttp_decode_uri_internal()
2013-03-01 12:02:54 +04:00
Nick Mathewson
9709461457
Merge remote-tracking branch 'origin/patches-2.0'
2013-02-14 14:13:11 -05:00
Greg Hazel
b618204216
fix #73 and fix http_connection_fail_test to catch it
2013-02-14 09:54:56 -08:00