|
15 | 15 | enum large_body_test {
|
16 | 16 | REQ_BODY_CHUNK_SIZE = 26 * 42,
|
17 | 17 | REQ_BODY_SIZE = REQ_BODY_CHUNK_SIZE * 480 - 26,
|
18 |
| - REQ_HTTP_REQUESTS = 2 |
| 18 | + REQ_HTTP_REQUESTS = 3 |
19 | 19 | };
|
20 | 20 |
|
21 | 21 | enum {
|
@@ -514,10 +514,20 @@ static int test_http_loop_base(bool secure, const char *met, bool http_conn,
|
514 | 514 | dconf.cache_ttl_max = 1800;
|
515 | 515 | dconf.getaddrinfo = dnsc_getaddrinfo_enabled(dnsc);
|
516 | 516 |
|
| 517 | + if (dns_set_conf_test) { |
| 518 | + err = dnsc_conf_set(dnsc, &dconf); |
| 519 | + if (err) |
| 520 | + goto out; |
| 521 | + } |
| 522 | + |
517 | 523 | err = http_client_alloc(&cli, dnsc);
|
518 | 524 | if (err)
|
519 | 525 | goto out;
|
520 | 526 |
|
| 527 | + err = http_client_set_config(cli, &hconf); |
| 528 | + if (err) |
| 529 | + goto out; |
| 530 | + |
521 | 531 | #ifdef USE_TLS
|
522 | 532 | if (secure) {
|
523 | 533 | struct tls* cli_tls;
|
@@ -590,23 +600,12 @@ static int test_http_loop_base(bool secure, const char *met, bool http_conn,
|
590 | 600 | sa_port(&srv),
|
591 | 601 | t.cert_auth ? "auth/" : "");
|
592 | 602 |
|
593 |
| - for (i = 1; i <= 10*REQ_HTTP_REQUESTS; i++) { |
| 603 | + for (i = 1; i <= REQ_HTTP_REQUESTS; i++) { |
594 | 604 | t.i_req_body = 0;
|
595 | 605 |
|
596 |
| - err = http_client_set_config(cli, &hconf); |
597 |
| - if (err) |
598 |
| - goto out; |
599 |
| - |
600 |
| - if (dns_set_conf_test) { |
601 |
| - err = dnsc_conf_set(dnsc, &dconf); |
602 |
| - if (err) |
603 |
| - goto out; |
604 |
| - } |
605 |
| - |
606 | 606 | t.clen = put ? REQ_BODY_SIZE :
|
607 | 607 | 2 * strlen("abcdefghijklmnopqrstuvwxyz");
|
608 | 608 |
|
609 |
| - |
610 | 609 | if (http_conn) {
|
611 | 610 | err = http_reqconn_alloc(&conn, cli,
|
612 | 611 | http_resp_handler, http_data_handler, &t);
|
|
0 commit comments