Lines Matching refs:evcon
320 struct evhttp_connection *evcon; in http_basic_cb() local
326 evcon = evhttp_request_get_connection(req); in http_basic_cb()
327 tt_assert(evhttp_connection_get_server(evcon) == arg); in http_basic_cb()
333 sa = evhttp_connection_get_addr(evcon); in http_basic_cb()
1065 struct evhttp_connection *evcon = NULL; in http_connection_test_() local
1091 evcon = evhttp_connection_base_bufferevent_new(data->base, dnsbase, bev, address, port); in http_connection_test_()
1096 evcon = evhttp_connection_base_new(data->base, dnsbase, address, port); in http_connection_test_()
1098 tt_assert(evcon); in http_connection_test_()
1099 evhttp_connection_set_family(evcon, family); in http_connection_test_()
1101 tt_assert(evhttp_connection_get_base(evcon) == data->base); in http_connection_test_()
1105 tt_assert(evhttp_connection_get_server(evcon) == NULL); in http_connection_test_()
1117 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_connection_test_()
1142 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_connection_test_()
1157 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_connection_test_()
1164 if (evcon) in http_connection_test_()
1165 evhttp_connection_free(evcon); in http_connection_test_()
1191 struct evhttp_connection *evcon = NULL; in http_connection_async_test() local
1211 evcon = evhttp_connection_base_new(data->base, dns_base, "127.0.0.1", port); in http_connection_async_test()
1212 tt_assert(evcon); in http_connection_async_test()
1225 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_connection_async_test()
1249 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_connection_async_test()
1264 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_connection_async_test()
1271 if (evcon) in http_connection_async_test()
1272 evhttp_connection_free(evcon); in http_connection_async_test()
1285 struct evhttp_connection *evcon = NULL; in http_autofree_connection_test() local
1292 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_autofree_connection_test()
1293 tt_assert(evcon); in http_autofree_connection_test()
1308 if (evhttp_make_request(evcon, req[i], EVHTTP_REQ_GET, "/test") == -1) { in http_autofree_connection_test()
1318 evhttp_connection_free_on_completion(evcon); in http_autofree_connection_test()
1319 evcon = NULL; in http_autofree_connection_test()
1328 if (evcon) in http_autofree_connection_test()
1329 evhttp_connection_free(evcon); in http_autofree_connection_test()
1391 struct evhttp_connection *evcon, **orig = evcons; in http_free_evcons() local
1396 while ((evcon = *evcons++)) { in http_free_evcons()
1397 evhttp_connection_free(evcon); in http_free_evcons()
1406 struct evhttp_connection **evcon = malloc(sizeof(*evcon) * (BACKLOG_SIZE + 1)); in http_fill_backlog() local
1412 evcon[i] = evhttp_connection_base_new(base, NULL, "127.0.0.1", port); in http_fill_backlog()
1413 tt_assert(evcon[i]); in http_fill_backlog()
1414 evhttp_connection_set_timeout(evcon[i], 5); in http_fill_backlog()
1418 tt_int_op(evhttp_make_request(evcon[i], req, EVHTTP_REQ_GET, "/delay"), !=, -1); in http_fill_backlog()
1420 evcon[i] = NULL; in http_fill_backlog()
1422 return evcon; in http_fill_backlog()
1455 struct evhttp_connection *evcon = NULL; in http_cancel_test() local
1506 evcon = evhttp_connection_base_new( in http_cancel_test()
1511 evhttp_connection_set_timeout(evcon, 5); in http_cancel_test()
1512 tt_assert(evcon); in http_cancel_test()
1514 bufev = evhttp_connection_get_bufferevent(evcon); in http_cancel_test()
1532 tt_int_op(evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/delay"), in http_cancel_test()
1563 tt_int_op(evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test"), in http_cancel_test()
1583 tt_int_op(evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test"), in http_cancel_test()
1592 if (evcon) in http_cancel_test()
1593 evhttp_connection_free(evcon); in http_cancel_test()
1666 struct evhttp_connection *evcon = NULL; in http_virtual_host_test() local
1694 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_virtual_host_test()
1695 tt_assert(evcon); in http_virtual_host_test()
1704 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, in http_virtual_host_test()
1722 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, in http_virtual_host_test()
1741 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, in http_virtual_host_test()
1759 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, in http_virtual_host_test()
1777 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, in http_virtual_host_test()
1814 if (evcon) in http_virtual_host_test()
1815 evhttp_connection_free(evcon); in http_virtual_host_test()
1921 struct evhttp_connection *evcon = NULL; in http_dispatcher_test() local
1927 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_dispatcher_test()
1928 tt_assert(evcon); in http_dispatcher_test()
1931 evhttp_connection_set_local_address(evcon, "127.0.0.1"); in http_dispatcher_test()
1944 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/?arg=val") == -1) { in http_dispatcher_test()
1951 if (evcon) in http_dispatcher_test()
1952 evhttp_connection_free(evcon); in http_dispatcher_test()
1970 struct evhttp_connection *evcon = NULL; in http_post_test() local
1976 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_post_test()
1977 tt_assert(evcon); in http_post_test()
1991 if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/postit") == -1) { in http_post_test()
2011 if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/postit") == -1) { in http_post_test()
2019 evhttp_connection_free(evcon); in http_post_test()
2109 struct evhttp_connection *evcon = NULL; in http_put_test() local
2115 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_put_test()
2116 tt_assert(evcon); in http_put_test()
2129 if (evhttp_make_request(evcon, req, EVHTTP_REQ_PUT, "/putit") == -1) { in http_put_test()
2135 evhttp_connection_free(evcon); in http_put_test()
2282 struct evhttp_connection *evcon = arg; in close_detect_launch() local
2283 struct event_base *base = evhttp_connection_get_base(evcon); in close_detect_launch()
2292 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in close_detect_launch()
2300 struct evhttp_connection *evcon = arg; in close_detect_cb() local
2301 struct event_base *base = evhttp_connection_get_base(evcon); in close_detect_cb()
2313 event_base_once(base, -1, EV_TIMEOUT, close_detect_launch, evcon, &tv); in close_detect_cb()
2323 struct evhttp_connection *evcon = NULL; in http_close_detection_() local
2333 evcon = evhttp_connection_base_new(data->base, NULL, in http_close_detection_()
2335 tt_assert(evcon); in http_close_detection_()
2336 evhttp_connection_set_timeout_tv(evcon, &sec_tenth); in http_close_detection_()
2339 tt_assert(evcon); in http_close_detection_()
2340 delayed_client = evcon; in http_close_detection_()
2347 req = evhttp_request_new(close_detect_cb, evcon); in http_close_detection_()
2353 if (evhttp_make_request(evcon, in http_close_detection_()
2364 if (evcon) in http_close_detection_()
2365 evhttp_connection_free(evcon); in http_close_detection_()
3326 struct evhttp_connection *evcon = NULL; in http_chunk_out_test_impl() local
3367 evcon = evhttp_connection_base_bufferevent_new( in http_chunk_out_test_impl()
3369 tt_assert(evcon); in http_chunk_out_test_impl()
3380 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/chunked") == -1) { in http_chunk_out_test_impl()
3390 if (evcon) in http_chunk_out_test_impl()
3391 evhttp_connection_free(evcon); in http_chunk_out_test_impl()
3403 struct evhttp_connection *evcon = NULL; in http_stream_out_test_impl() local
3412 evcon = evhttp_connection_base_bufferevent_new( in http_stream_out_test_impl()
3414 tt_assert(evcon); in http_stream_out_test_impl()
3428 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/streamed") in http_stream_out_test_impl()
3436 if (evcon) in http_stream_out_test_impl()
3437 evhttp_connection_free(evcon); in http_stream_out_test_impl()
3475 struct evhttp_connection *evcon; in http_stream_in_test_() local
3483 evcon = evhttp_connection_base_new(data->base, NULL,"127.0.0.1", port); in http_stream_in_test_()
3484 tt_assert(evcon); in http_stream_in_test_()
3490 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, url) == -1) { in http_stream_in_test_()
3511 if (evcon) in http_stream_in_test_()
3512 evhttp_connection_free(evcon); in http_stream_in_test_()
3548 struct evhttp_connection *evcon; in http_stream_in_cancel_test() local
3553 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_stream_in_cancel_test()
3554 tt_assert(evcon); in http_stream_in_cancel_test()
3560 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/chunked") == -1) { in http_stream_in_cancel_test()
3568 evhttp_connection_free(evcon); in http_stream_in_cancel_test()
3576 struct evhttp_connection *evcon = arg; in http_connection_fail_done() local
3577 struct event_base *base = evhttp_connection_get_base(evcon); in http_connection_fail_done()
3585 evhttp_connection_free(evcon); in http_connection_fail_done()
3600 struct evhttp_connection *evcon = NULL; in http_connection_fail_test_impl() local
3614 evcon = evhttp_connection_base_bufferevent_new( in http_connection_fail_test_impl()
3616 tt_assert(evcon); in http_connection_fail_test_impl()
3623 req = evhttp_request_new(http_connection_fail_done, evcon); in http_connection_fail_test_impl()
3626 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/") == -1) { in http_connection_fail_test_impl()
3674 struct evhttp_connection *evcon = NULL; in http_simple_test_impl() local
3688 evcon = evhttp_connection_base_bufferevent_new( in http_simple_test_impl()
3690 tt_assert(evcon); in http_simple_test_impl()
3691 evhttp_connection_set_local_address(evcon, "127.0.0.1"); in http_simple_test_impl()
3696 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, uri) == -1) in http_simple_test_impl()
3703 if (evcon) in http_simple_test_impl()
3704 evhttp_connection_free(evcon); in http_simple_test_impl()
3717 struct evhttp_connection *evcon = NULL; in http_connection_retry_test_basic() local
3731 evcon = evhttp_connection_base_bufferevent_new(data->base, dns_base, bev, addr, hs.port); in http_connection_retry_test_basic()
3732 tt_assert(evcon); in http_connection_retry_test_basic()
3734 tt_assert(!evhttp_connection_set_flags(evcon, EVHTTP_CON_REUSE_CONNECTED_ADDR)); in http_connection_retry_test_basic()
3736 evhttp_connection_set_timeout(evcon, 1); in http_connection_retry_test_basic()
3738 evhttp_connection_set_local_address(evcon, "127.0.0.1"); in http_connection_retry_test_basic()
3751 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, in http_connection_retry_test_basic()
3775 evhttp_connection_set_timeout_tv(evcon, &tv_timeout); in http_connection_retry_test_basic()
3776 evhttp_connection_set_initial_retry_tv(evcon, &tv_retry); in http_connection_retry_test_basic()
3778 evhttp_connection_set_retries(evcon, 1); in http_connection_retry_test_basic()
3786 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, in http_connection_retry_test_basic()
3806 evhttp_connection_set_timeout(evcon, 1); in http_connection_retry_test_basic()
3807 evhttp_connection_set_retries(evcon, 3); in http_connection_retry_test_basic()
3815 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, in http_connection_retry_test_basic()
3837 if (evcon) in http_connection_retry_test_basic()
3838 evhttp_connection_free(evcon); in http_connection_retry_test_basic()
3979 struct evhttp_connection *evcon = NULL; in http_negative_content_length_test() local
3985 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_negative_content_length_test()
3986 tt_assert(evcon); in http_negative_content_length_test()
3999 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_negative_content_length_test()
4006 if (evcon) in http_negative_content_length_test()
4007 evhttp_connection_free(evcon); in http_negative_content_length_test()
4043 struct evhttp_connection *evcon = NULL; in http_data_length_constraints_test_impl() local
4063 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_data_length_constraints_test_impl()
4064 tt_assert(evcon); in http_data_length_constraints_test_impl()
4067 tt_assert(!evhttp_connection_set_flags(evcon, EVHTTP_CON_READ_ON_WRITE_ERROR)); in http_data_length_constraints_test_impl()
4069 evhttp_connection_set_local_address(evcon, "127.0.0.1"); in http_data_length_constraints_test_impl()
4079 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/?arg=val") == -1) { in http_data_length_constraints_test_impl()
4089 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, long_str) == -1) { in http_data_length_constraints_test_impl()
4103 if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) { in http_data_length_constraints_test_impl()
4113 if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) { in http_data_length_constraints_test_impl()
4125 if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) { in http_data_length_constraints_test_impl()
4137 if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) { in http_data_length_constraints_test_impl()
4144 if (evcon) in http_data_length_constraints_test_impl()
4145 evhttp_connection_free(evcon); in http_data_length_constraints_test_impl()
4161 struct evhttp_connection *evcon = NULL; in http_lingering_close_test_impl() local
4174 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_lingering_close_test_impl()
4175 tt_assert(evcon); in http_lingering_close_test_impl()
4176 evhttp_connection_set_local_address(evcon, "127.0.0.1"); in http_lingering_close_test_impl()
4195 if (evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/") == -1) { in http_lingering_close_test_impl()
4202 if (evcon) in http_lingering_close_test_impl()
4203 evhttp_connection_free(evcon); in http_lingering_close_test_impl()
4260 terminate_chunked_close_cb(struct evhttp_connection *evcon, void *arg) in terminate_chunked_close_cb() argument
4413 http_request_get_addr_on_close(struct evhttp_connection *evcon, void *arg) in http_request_get_addr_on_close() argument
4420 tt_assert(evcon); in http_request_get_addr_on_close()
4422 storage = evhttp_connection_get_addr(evcon); in http_request_get_addr_on_close()
4440 struct evhttp_connection *evcon = NULL; in http_get_addr_test() local
4447 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_get_addr_test()
4448 tt_assert(evcon); in http_get_addr_test()
4449 evhttp_connection_set_closecb(evcon, http_request_get_addr_on_close, arg); in http_get_addr_test()
4459 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_get_addr_test()
4465 http_request_get_addr_on_close(evcon, NULL); in http_get_addr_test()
4468 if (evcon) in http_get_addr_test()
4469 evhttp_connection_free(evcon); in http_get_addr_test()
4548 struct evhttp_connection *evcon = NULL; in http_request_own_test() local
4557 evcon = evhttp_connection_base_new(data->base, NULL, "127.0.0.1", port); in http_request_own_test()
4558 tt_assert(evcon); in http_request_own_test()
4562 if (evhttp_make_request(evcon, req, EVHTTP_REQ_GET, "/test") == -1) { in http_request_own_test()
4570 if (evcon) in http_request_own_test()
4571 evhttp_connection_free(evcon); in http_request_own_test()