test/regress_http.c


Log

Author Commit Date CI Message
Azat Khuzhin ccd67243 2020-06-25T21:56:31 test: fix memory leaks for https (add BEV_OPT_CLOSE_ON_FREE) - http/https_filter_basic - http/https_filter_chunk_out (cherry picked from commit ec94a6bb3f9d950101d07b2a2e092b675d5aa3f0)
Azat Khuzhin a91abd0e 2020-06-25T09:59:35 test: do not pass NULL to memcmp() in evbuffer_datacmp() helper Fixes: runtime error: null pointer passed as argument 2, which is declared to never be null (cherry picked from commit 6f152befb4523fd2e57c1a937e590f8ff87b7f15)
Azat Khuzhin 65a002a8 2020-05-25T02:06:32 test: http/autofree_connection cleanup (cherry picked from commit e8c8951029a0a084dd73b27e6dc3b637a7c914db)
Azat Khuzhin 8dc6468e 2020-05-19T01:05:50 test: cleanup http/autofree_connection (cherry picked from commit 70f69194eb3b19b5e41b52b17a820e1e91512560)
Azat Khuzhin ab130875 2020-05-19T00:52:01 test: fix http/autofree_connection Refs: #182 (cherry picked from commit 1cc94feab81e7387041edc32be9843f66847072d)
Azat Khuzhin 89932001 2019-04-03T07:26:21 Disable logging for tests that assume printing warnings To avoid possible confusion But there is still one test that has some messages on windows: main/methods Because this test needs >1 of avaiable methods, otherwise it will warn. (cherry picked from commit 47d348a63130c91f2a6aadef291ff5687275df72)
Azat Khuzhin e66078a0 2019-01-29T21:12:33 Eliminate fd conversion warnings and introduce EVUTIL_INVALID_SOCKET (windows) windows has intptr_t instead of regular int. Also tt_fd_op() had been introduced, since we cannot use tt_int_op() for comparing fd, since it is not always int. (cherry picked from commit b29207dceee33832bb28ab103a833df6a2fd29d3)
Azat Khuzhin eb7b472b 2019-01-29T01:18:39 Merge branch 'http-EVHTTP_CON_READ_ON_WRITE_ERROR-fixes-v2' * http-EVHTTP_CON_READ_ON_WRITE_ERROR-fixes-v2: http: try to read existing data in buffer under EVHTTP_CON_READ_ON_WRITE_ERROR test: add logging for http/read_on_write_error and rearrange code http: do not call deferred readcb if readcb is not set Refs: #749 (cherry picked from commit 7bfe93886d7fccad2d9a6c76cf47c47d3668f9d1)
Azat Khuzhin f9b592aa 2018-11-23T00:42:46 test: add TT_RETRIABLE for http/cancel_by_host_no_ns Could fail from time to time in travis-ci: https://travis-ci.org/libevent/libevent/jobs/458554097#L1702 Follow-up-for: fe5b0719 ("Mark a lot of flacky tests with TT_RETRIABLE (for linux/win32 only)") (cherry picked from commit 1d2ef90032bc842bc2e295ee4adce3408b6d85da)
Azat Khuzhin 6ea1ec68 2018-11-21T00:10:43 Merge branch 'TT_RETRIABLE' * TT_RETRIABLE: Mark a lot of flacky tests with TT_RETRIABLE (for linux/win32 only) regress: introduce TT_RETRIABLE Fixes: #704 (cherry picked from commit 4d2f013b5d20e674b22e5a8244f7fa63172dbdbf)
Azat Khuzhin 241780bd 2018-11-20T06:20:51 regress_http: fix compilation with !EVENT__HAVE_OPENSSL Fixes: 811c63f7 ("regress: test for HTTP/HTTPS with IOCP enabled") (cherry picked from commit 3036f15a176b038f42d3896463c39058c6bac943)
Azat Khuzhin 6bfac964 2018-11-13T22:47:43 Merge branch 'iocp-fixes' * iocp-fixes: regress: test for HTTP/HTTPS with IOCP enabled bev_async: trigger/run only deferred callbacks bev_async: do not initialize timeouts multiple times bev_async: set "ok" on setfd if fd>=0 (like we do during creation) bev_async: ignore ERROR_INVALID_PARAMETER on .setfd for iocp Closes: #709 Refs: nmathewson/Libevent#160 (cherry picked from commit 3d815cf22074792f31274fd6d810a94984661dbf)
Azat Khuzhin 35ca9643 2018-11-05T21:33:54 regress_http: disable http/read_on_write_error under win32 EVHTTP_CON_READ_ON_WRITE_ERROR works only if an error already read from the socket, but if we already got EPIPE on write we cannot read from the socket anymore, and win32 does not guarantee that read will happens before (although it happens from time to time). In the referenced patch I just replaced callback with not expecting 417, but like I already wrote, this is not always true (i.e. it is flacky). Fixes: 3b581693ac1967f7f8d98491cb772a1b415eb4cd ("test/http: read_on_write_error: fix it for win32") (cherry picked from commit 9040707fb176040acf250b09a223d6b4400f4086)
Azat Khuzhin 6594bfb4 2018-11-02T23:43:57 regress_http: make https_basic non time dependent Fixes: #454 (cherry picked from commit e29afd4b9428631444b208edfe3a4ba6ce4423af)
Azat Khuzhin 349081e1 2018-10-28T19:48:37 Merge branch 'win32-visibility-event_debug_logging_mask_' * win32-visibility-event_debug_logging_mask_: Introduce EVENT_VISIBILITY_WANT_DLLIMPORT regress_http: use TT_BLAZER() over event_debug() Fixes: #702 (cherry picked from commit fb8666453ce8bb1d599a68636bed5db5ef4a7a57)
Azat Khuzhin f895e17e 2018-10-27T19:34:52 regress_ssl: reset static variables on test setup/cleanup and eliminate leaks One tricky bit is reply to the BIO_C_GET_FD command, since otherwise it will try to close(0) and accepted bev in ssl/bufferevent_connect_sleep will leak. Other seems more or less trivial. This was done to make sure that for at least generic cases does not leak (tricky cases was listed here nmathewson/Libevent#83). And this will allow run ssl/.. with --no-fork (cherry picked from commit 9fe952a0aea25474de3dbc30350b1ffa5abcd65a)
Azat Khuzhin f3aa6a47 2018-10-27T17:36:09 regress_http: basic evhttp_parse_query_str() coverage (cherry picked from commit d161ec3842259f2896fc9b15a1e4d5a1ed178bb2)
Azat Khuzhin cdcfbafe 2018-10-23T00:12:23 Merge branch 'http-request-line-parsing' * http-request-line-parsing: Fix http https_basic/https_filter_basic under valgrind (increase timeout) http: cover various non RFC3986 conformant URIs http: allow non RFC3986 conformant during parsing request-line (http server) http: do not try to parse request-line if we do not have enough bytes http: allow trailing spaces (and only them) in request-line (like nginx) http: cleanup of the request-line parsing (cherry picked from commit 0ec12bc84cf09307e01dc3b00d08ac1f816b6ff7)
Azat Khuzhin 61b95600 2018-04-24T02:22:58 test/http: cover evhttp_connection_get_addr() for incomming connections Refs: #510 (cherry picked from commit e4edc7fc27bb96b4811f1c24d591f5c5bca69bdd)
Azat Khuzhin b2581380 2017-11-04T19:13:28 Fix crashing http server when callback do not reply in place from *gencb* This is the second hunk of the first patch 5ff8eb26371c4dc56f384b2de35bea2d87814779 ("Fix crashing http server when callback do not reply in place") Fixes: #567 (cherry picked from commit 306747e51c1f0de679a3b165b9429418c89f8d6a)
Azat Khuzhin 5b40744d 2017-10-23T00:13:37 Fix crashing http server when callback do not reply in place General http callback looks like: static void http_cb(struct evhttp_request *req, void *arg) { evhttp_send_reply(req, HTTP_OK, "Everything is fine", NULL); } And they will work fine becuase in this case http will write request first, and during write preparation it will disable *read callback* (in evhttp_write_buffer()), but if we don't reply immediately, for example: static void http_cb(struct evhttp_request *req, void *arg) { return; } This will leave connection in incorrect state, and if another request will be written to the same connection libevent will abort with: [err] ../http.c: illegal connection state 7 Because it thinks that read for now is not possible, since there were no write. Fix this by disabling EV_READ entirely. We couldn't just reset callbacks because this will leave EOF detection, which we don't need, since user hasn't replied to callback yet. Reported-by: Cory Fields <cory@coryfields.com> (cherry picked from commit 5ff8eb26371c4dc56f384b2de35bea2d87814779)
Azat Khuzhin 300a0dc6 2017-05-01T21:56:27 test: do not use .fieldname in structure initializations (fixes win32) Fixes: #497 (cherry picked from commit 15da23cfdbeb5d5b4eeafca0cd93962c26641ae5)
Azat Khuzhin ebd12e6d 2017-03-14T13:31:02 Merge branch 'win32-fixes' This patchset fixes win32 builds after some previous patches (referenced in particular commits), and also removes some quirks for win32. * win32-fixes: test: do not return void log/win32: fix exporting extern variable log-internal: missing extern "C" log: remove USE_GLOBAL_FOR_DEBUG_LOGGING cmake: Export missing symbols for win32 cmake: eliminate EVENT_BUILDING_REGRESS_TEST, since we link with shared libs test: windows doesn't have WNOWAIT cmake: clean not used #defines from event-config.h cmake: add <pthread.h> only for non-win32 (cherry picked from commit d84f0205453941235b0e04729098d4329c189bba)
Azat Khuzhin d77fcea1 2016-12-07T03:07:59 test/https: separate cases for https client with filtered openssl bufferevent - http/https_filter_chunk_out # now hang - http/https_filter_basic # works, since writes only before connect()
Azat Khuzhin 26f416c1 2017-01-07T11:48:28 test/http: turn off some tests that based on backlog filling (falky) Since this technique does not work well everywhere, anyway it fails from time to time. See: https://travis-ci.org/libevent/libevent/jobs/186426446
Azat Khuzhin cfe2ab22 2016-11-19T17:53:38 test/https: fix ssl dirty bypass for https_simple Tests: - http/https_simple_dirty # not affected, since dirty is the default - http/https_simple # affected v2: fix compilation with -DEVENT__DISABLE_OPENSSL=ON
Azat Khuzhin 45247e6f 2016-11-19T15:54:52 test/https: cover multiple request over the same connection Introduce two new tests: - http/https_connection # fail - http/https_persist_connection # ok Reported-by: liutao74748@163.com
Azat Khuzhin e6ae069b 2016-11-19T17:11:35 test/http: sanity check for http_request_empty_done()
Thomas Bernard e9837124 2014-12-13T19:42:42 use ev_uint16_t instead of unsigned short for port Like in `sockaddr_in` structure in /usr/include/netinet/in.h @azat: convert all other users (bench, compat, ..) and tweak message Fixes: #178 Fixes: #196 Refs: 6bf1ca78 Link: https://codereview.appspot.com/156040043/#msg4
Azat Khuzhin 500b6b75 2016-08-10T16:50:19 test/http: do not run tests that based on backlog filling (freebsd) I cannot find any other solution for now, so simply ignore them for now, we should think about normal fix for this. Refs: #388
Azat Khuzhin d5a2f2f9 2016-08-09T12:10:18 test/https_basic: increase timeout for complete write (fixes win32) Otherwise on win32 we got 2, but test is ok, some timings issue. Introduced-in: c968eb3 Fixes: https://ci.appveyor.com/project/azat/libevent/build/2.1.5.107/job/k70our1xdp0ym4dm#L1906
Azat Khuzhin 2a4bf294 2016-06-17T16:14:02 test/http: avoid using conditionals with omitted operands (fixes VS2015) But we need to add VS2015 build on appveyor. Fixes: #361 Reported-by: @nntrab
Azat Khuzhin aabf1c2d 2016-06-17T16:07:15 test/http: don't mix declarations and code (fixes -Wdeclaration-after-statement)
Azat Khuzhin bddad71e 2016-03-25T11:22:43 test/http: fix running some tests sequential (with --no-fork) After this patch $ regress --no-fork +http/.. Passed without failures.
Azat Khuzhin cbc3209d 2016-03-25T11:04:51 test/http: localize evhttp server structure
Azat Khuzhin d49a6587 2016-03-24T20:29:25 test/http: fix SERVER_TIMEOUT tests under win32 Seems that the hack with filling BACKLOG didn't work on win32, and hence we stuck in write() waiting, not in connect() And: $ time regress http/cancel_server_timeout - on linux: 10secs - on win32: 2-5secs I tried to debug this but you can't sniff TCP packages (wireshark/rawpcap) on localhost in windows xp (according to [RAWPCAP] and my testing). RAWPCAP: http://www.netresec.com/?page=RawCap
Azat Khuzhin 376f1073 2016-03-24T20:26:50 test/http: add a helper for creating timedout/failed request
Azat Khuzhin d02a2858 2016-03-24T14:11:10 test/http: adopt for C90 (mixed code and declarations)
Azat Khuzhin 0c343afe 2016-03-24T10:27:24 test/http: cover NS timed out during request cancellations separatelly
Azat Khuzhin 334340da 2016-03-12T18:50:41 test/http: request cancellation with resolving/{conn,write}-timeouts in progress This patch adds 8 new tests: - http/cancel - http/cancel_by_host - http/cancel_by_host_no_ns - http/cancel_by_host_inactive_server - http/cancel_inactive_server - http/cancel_by_host_no_ns_inactive_server - http/cancel_by_host_server_timeout - http/cancel_server_timeout - http/cancel_by_host_no_ns_server_timeout This patches not 100% for http layer, but more for be_sock, but it was simpler to add them here, plus it also shows some bugs with fd leaking in http layer. Right now we have next picture (we can also play with timeouts/attempts for evdns to make tests fail, IOW to track the failures even without valgrind): $ valgrind --leak-check=full --show-reachable=yes --track-fds=yes --error-exitcode=1 regress --no-fork http/cancel.. http/cancel: OK http/cancel_by_host: OK http/cancel_by_host_no_ns: [msg] Nameserver 127.0.0.1:42489 has failed: request timed out. [msg] All nameservers have failed OK http/cancel_by_host_inactive_server: OK http/cancel_inactive_server: OK http/cancel_by_host_no_ns_inactive_server: [msg] Nameserver 127.0.0.1:51370 has failed: request timed out. [msg] All nameservers have failed OK http/cancel_by_host_server_timeout: OK http/cancel_server_timeout: OK http/cancel_by_host_no_ns_server_timeout: [msg] Nameserver 127.0.0.1:45054 has failed: request timed out. [msg] All nameservers have failed OK 9 tests ok. (0 skipped) ==3202== ==3202== FILE DESCRIPTORS: 2309 open at exit. ... ==8403== HEAP SUMMARY: ==8403== in use at exit: 1,104 bytes in 5 blocks ==8403== total heap usage: 10,916 allocs, 10,911 frees, 1,458,818 bytes allocated ==8403== ==8403== 40 bytes in 1 blocks are indirectly lost in loss record 1 of 5 ==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459) ==8403== by 0x498E48: evbuffer_add_cb (buffer.c:3309) ==8403== by 0x4A0DE2: bufferevent_socket_new (bufferevent_sock.c:366) ==8403== by 0x4BF8BA: evhttp_connection_base_bufferevent_new (http.c:2369) ==8403== by 0x4BFA6A: evhttp_connection_base_new (http.c:2421) ==8403== by 0x460CFC: http_cancel_test (regress_http.c:1413) ==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105) ==8403== by 0x490C47: testcase_run_one (tinytest.c:252) ==8403== by 0x491586: tinytest_main (tinytest.c:434) ==8403== by 0x47DFCD: main (regress_main.c:461) ==8403== ==8403== 136 bytes in 1 blocks are indirectly lost in loss record 2 of 5 ==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459) ==8403== by 0x491EDD: evbuffer_new (buffer.c:365) ==8403== by 0x49A0AB: bufferevent_init_common_ (bufferevent.c:300) ==8403== by 0x4A0D31: bufferevent_socket_new (bufferevent_sock.c:353) ==8403== by 0x4BF8BA: evhttp_connection_base_bufferevent_new (http.c:2369) ==8403== by 0x4BFA6A: evhttp_connection_base_new (http.c:2421) ==8403== by 0x460CFC: http_cancel_test (regress_http.c:1413) ==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105) ==8403== by 0x490C47: testcase_run_one (tinytest.c:252) ==8403== by 0x491586: tinytest_main (tinytest.c:434) ==8403== by 0x47DFCD: main (regress_main.c:461) ==8403== ==8403== 136 bytes in 1 blocks are indirectly lost in loss record 3 of 5 ==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459) ==8403== by 0x491EDD: evbuffer_new (buffer.c:365) ==8403== by 0x49A0E8: bufferevent_init_common_ (bufferevent.c:305) ==8403== by 0x4A0D31: bufferevent_socket_new (bufferevent_sock.c:353) ==8403== by 0x4BF8BA: evhttp_connection_base_bufferevent_new (http.c:2369) ==8403== by 0x4BFA6A: evhttp_connection_base_new (http.c:2421) ==8403== by 0x460CFC: http_cancel_test (regress_http.c:1413) ==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105) ==8403== by 0x490C47: testcase_run_one (tinytest.c:252) ==8403== by 0x491586: tinytest_main (tinytest.c:434) ==8403== by 0x47DFCD: main (regress_main.c:461) ==8403== ==8403== 528 bytes in 1 blocks are indirectly lost in loss record 4 of 5 ==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459) ==8403== by 0x4A0D02: bufferevent_socket_new (bufferevent_sock.c:350) ==8403== by 0x4BF8BA: evhttp_connection_base_bufferevent_new (http.c:2369) ==8403== by 0x4BFA6A: evhttp_connection_base_new (http.c:2421) ==8403== by 0x460CFC: http_cancel_test (regress_http.c:1413) ==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105) ==8403== by 0x490C47: testcase_run_one (tinytest.c:252) ==8403== by 0x491586: tinytest_main (tinytest.c:434) ==8403== by 0x47DFCD: main (regress_main.c:461) ==8403== ==8403== 1,104 (264 direct, 840 indirect) bytes in 1 blocks are definitely lost in loss record 5 of 5 ==8403== at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==8403== by 0x4AAD2D: event_mm_calloc_ (event.c:3459) ==8403== by 0x4D0326: evdns_getaddrinfo (evdns.c:4682) ==8403== by 0x4B1213: evutil_getaddrinfo_async_ (evutil.c:1568) ==8403== by 0x4A1255: bufferevent_socket_connect_hostname (bufferevent_sock.c:517) ==8403== by 0x4C00B6: evhttp_connection_connect_ (http.c:2582) ==8403== by 0x4C02B8: evhttp_make_request (http.c:2637) ==8403== by 0x4614EC: http_cancel_test (regress_http.c:1496) ==8403== by 0x490965: testcase_run_bare_ (tinytest.c:105) ==8403== by 0x490C47: testcase_run_one (tinytest.c:252) ==8403== by 0x491586: tinytest_main (tinytest.c:434) ==8403== by 0x47DFCD: main (regress_main.c:461) ==8403== ==8403== LEAK SUMMARY: ==8403== definitely lost: 264 bytes in 1 blocks ==8403== indirectly lost: 840 bytes in 4 blocks ==8403== possibly lost: 0 bytes in 0 blocks ==8403== still reachable: 0 bytes in 0 blocks ==8403== suppressed: 0 bytes in 0 blocks
Azat Khuzhin 927ab33f 2016-03-13T13:05:25 test/http: exit from the loop in the errorcb to wait cancellation This will make cancellation tests more graceful, that said that error_cb can not be called sometimes if you will break the loop in cancel. Plus drop that define for function generations, since function body changed, and it is not generic anymore, plus that macro didn't used by anyone else.
Azat Khuzhin 3b581693 2016-03-11T20:06:11 test/http: read_on_write_error: fix it for win32 Fixes: https://ci.appveyor.com/project/nmathewson/libevent/build/2.1.5.216#L499 (win32)
Azat Khuzhin 5c2b4c19 2016-03-11T19:25:11 test/http: separate coverage for EVHTTP_CON_READ_ON_WRITE_ERROR
Azat Khuzhin 31d81163 2016-03-11T14:23:03 test/http: cover "Expect: 100-continue" client-server interaction
Azat Khuzhin ed469abb 2016-03-11T16:18:48 test/http: *lingering tests shouldn't have "Expect: 100-continue"
Azat Khuzhin 04fc82f7 2016-03-11T01:27:52 test: use EVUTIL_SHUT_WR
Azat Khuzhin 31667659 2016-03-10T18:40:34 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
Azat Khuzhin e122ca1e 2016-02-15T03:21:39 test: http/lingering_close: cover EVHTTP_SERVER_LINGERING_CLOSE
Azat Khuzhin f41e1b01 2016-02-15T03:13:02 test: http/non_lingering_close: cover ~EVHTTP_SERVER_LINGERING_CLOSE
Azat Khuzhin addf2b90 2016-02-15T03:46:20 test: http/*: update expected HTTP codes for body exceeds `max_body_size`
Azat Khuzhin d38a7239 2016-02-15T02:41:19 test: http/data_length_constrains: set EVHTTP_CON_READ_ON_WRITE_ERROR
Azat Khuzhin 0792e1e7 2016-02-10T12:37:30 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
Azat Khuzhin 23c77b60 2015-11-15T00:12:25 test/http: write_during_read for https
Azat Khuzhin 7ea26f71 2015-11-15T00:08:24 test/http: connection_fail for https
Azat Khuzhin ac049683 2015-11-15T00:05:00 test/http: stream_out for https
Azat Khuzhin a71ffb9d 2015-11-06T15:58:41 test/http: chunk_out for https
Azat Khuzhin 3160716f 2015-11-06T10:13:13 test/regress: fix ssl-less builds (need to make this prettier) CI: https://travis-ci.org/libevent/libevent/jobs/89590839
Azat Khuzhin 1ede3262 2015-11-06T02:24:28 test/http: allow dirty shutdown for ssl to fix https_incomplete
Azat Khuzhin 59714b46 2015-11-05T19:12:58 test/http: https basic
Azat Khuzhin 615490d0 2015-11-05T19:08:30 test/http: incomplete{,_timeout} for https
Azat Khuzhin 93b19dc5 2015-11-05T12:39:35 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.
Azat Khuzhin 7c2d24ae 2015-11-05T11:17:07 test/http: https: retry coverage
Azat Khuzhin a7088ad0 2015-11-05T10:58:41 test/http: https server support (plus some helpers) TODO: - check BEV_OPT_DEFER_CALLBACKS separately
Azat Khuzhin a27c53c5 2015-11-05T11:18:32 test/http: more sanity checks
Azat Khuzhin cd422e09 2015-10-09T01:50:05 test/regress_http: fix compilation warnings (-Wmissing-field-initializers)
Azat Khuzhin 6f6fa0d2 2015-09-09T19:15:18 test/regress_http: cover evhttp_request_own()
Azat Khuzhin 3d15aeb4 2015-09-09T17:45:44 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.
Azat Khuzhin 4be6c70b 2015-09-08T15:44:13 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
Ed Schouten fd36647a 2015-08-25T15:24:39 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.
Azat Khuzhin 9f0bff3f 2015-08-18T21:30:48 test/regress_http: initialize "dns_base" to avoid reading trash Even though it is very unlikely, but it will better to fix this.
Azat Khuzhin a50f5f0a 2015-01-01T06:27:31 http: reuse connected address only with EVHTTP_CON_REUSE_CONNECTED_ADDR
Azat Khuzhin f4874d8c 2014-11-15T20:35:40 test/http: cover retrying with saved conn_address by shutting down dns server
John Ohl b0e99244 2014-10-29T03:40:44 Add test for evhttp_connection_free_on_completion
Nick Mathewson 89c1a3b7 2014-09-18T12:40:38 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.
Nick Mathewson c119f241 2014-09-18T11:54:04 Fix a dead-code warning in unit tests. CID 1193548
Nick Mathewson 73615a37 2014-09-18T11:31:52 Merge pull request #118 from azat/http-forward-family-to-bufferevent Add evhttp_connection_set_family() to set addrinfo->family for DNS requests
Azat Khuzhin 3fbf3cc9 2014-03-27T00:49:00 test/http: add regress test for set family to AF_INET6
Azat Khuzhin 42aefeb0 2014-03-27T00:40:14 test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC
Azat Khuzhin 177b8a7c 2014-03-27T00:44:51 test: add family argument for http_connection_test_()
Nick Mathewson 6a1c4d50 2014-03-18T18:36:32 Correctly skip ipv6 http test on systems without ipv6
Nick Mathewson 2578ec14 2014-03-13T10:46:59 Avoid double-close paths in http tests Coverity spotted that there were some paths through the test functions that would double-close some sockets.
Nick Mathewson 21477e40 2014-03-12T18:13:19 Skip http/ipv6_for_domain test when we have no ipv6 support
Nick Mathewson d240328d 2014-01-08T13:02:37 Fix even more coverity warnings.
Nick Mathewson 860767e8 2014-01-08T12:46:09 Fix a couple of compilation warnings in regress_http.c
Nick Mathewson 867f401f 2014-01-08T11:51:22 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.
Andrew Sweeney b85f3987 2014-01-06T21:19:15 Update unit test to make sure that the callback happens after the output data is written
Andrew Sweeney b083ca05 2014-01-05T20:35:46 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.
Azat Khuzhin 4dd500cd 2013-10-01T19:54:09 regress_http: add tests for evhttp_connection_get_addr()
Maxime Henrion fbc323b7 2013-07-31T15:02:07 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.
Nick Mathewson 5bc290e2 2013-05-01T10:04:08 Make http/connection_retry off-by-default
Azat Khuzhin 54cc8005 2013-03-21T17:01:31 Drop extra header http_struct.h from regress_http.c
Azat Khuzhin 862c217a 2013-03-22T14:35:47 Add test for EVREQ_HTTP_REQUEST_CANCEL into http_cancel_test()
Azat Khuzhin 7b077194 2013-03-21T13:55:40 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)
Azat Khuzhin 13676535 2013-03-01T12:01:42 Test: decoding just part of string with evhttp_decode_uri_internal()
Nick Mathewson 97094614 2013-02-14T14:13:11 Merge remote-tracking branch 'origin/patches-2.0'
Greg Hazel b6182042 2013-02-14T09:54:56 fix #73 and fix http_connection_fail_test to catch it
Azat Khuzhin 9ec88bdf 2013-01-27T02:17:02 Add regress test ipv6_for_domain. Written for commit 71e709c7829275a594f767b27468b1b52e8b5bb9. Fix ipv6 support for http. When URL contain domain, not IP address.
Nick Mathewson c6ff3812 2012-11-16T11:38:53 Remove internal ws from multiline http headers correctly According to RFC2616: All linear white space, including folding, has the same semantics as SP. A recipient MAY replace any linear white space with a single SP before interpreting the field value or forwarding the message downstream.
Nick Mathewson 7ef04e4b 2012-07-26T10:09:13 Merge remote-tracking branch 'origin/patches-2.0' Conflicts: configure.in test/regress_buffer.c test/regress_dns.c
Nick Mathewson 270f279f 2012-07-26T09:53:20 Fix resource leaks in the unit tests; found by coverity