|
23 | 23 | ***************************************************************************/
|
24 | 24 | #include "test.h"
|
25 | 25 |
|
| 26 | +#include "testtrace.h" |
26 | 27 | #include "testutil.h"
|
27 | 28 | #include "warnless.h"
|
28 | 29 | #include "memdebug.h"
|
@@ -104,26 +105,39 @@ CURLcode test(char *URL)
|
104 | 105 |
|
105 | 106 | global_init(CURL_GLOBAL_ALL);
|
106 | 107 |
|
| 108 | + libtest_debug_config.nohex = 1; |
| 109 | + libtest_debug_config.tracetime = 1; |
| 110 | + |
107 | 111 | easy_init(hnd);
|
108 | 112 | easy_setopt(hnd, CURLOPT_URL, URL);
|
| 113 | + easy_setopt(hnd, CURLOPT_CONNECTTIMEOUT, 1L); |
109 | 114 | easy_setopt(hnd, CURLOPT_HSTSREADFUNCTION, hstsread);
|
110 | 115 | easy_setopt(hnd, CURLOPT_HSTSREADDATA, &st);
|
111 | 116 | easy_setopt(hnd, CURLOPT_HSTSWRITEFUNCTION, hstswrite);
|
112 | 117 | easy_setopt(hnd, CURLOPT_HSTSWRITEDATA, &st);
|
113 | 118 | easy_setopt(hnd, CURLOPT_HSTS_CTRL, CURLHSTS_ENABLE);
|
| 119 | + easy_setopt(hnd, CURLOPT_DEBUGDATA, &libtest_debug_config); |
| 120 | + easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, libtest_debug_cb); |
| 121 | + easy_setopt(hnd, CURLOPT_VERBOSE, 1L); |
114 | 122 | res = curl_easy_perform(hnd);
|
115 | 123 | curl_easy_cleanup(hnd);
|
116 | 124 | hnd = NULL;
|
| 125 | + if(res == CURLE_OPERATION_TIMEDOUT) /* we expect that on Windows */ |
| 126 | + res = CURLE_COULDNT_CONNECT; |
117 | 127 | printf("First request returned %d\n", res);
|
118 | 128 | res = CURLE_OK;
|
119 | 129 |
|
120 | 130 | easy_init(hnd);
|
121 | 131 | easy_setopt(hnd, CURLOPT_URL, URL);
|
| 132 | + easy_setopt(hnd, CURLOPT_CONNECTTIMEOUT, 1L); |
122 | 133 | easy_setopt(hnd, CURLOPT_HSTSREADFUNCTION, hstsreadfail);
|
123 | 134 | easy_setopt(hnd, CURLOPT_HSTSREADDATA, &st);
|
124 | 135 | easy_setopt(hnd, CURLOPT_HSTSWRITEFUNCTION, hstswrite);
|
125 | 136 | easy_setopt(hnd, CURLOPT_HSTSWRITEDATA, &st);
|
126 | 137 | easy_setopt(hnd, CURLOPT_HSTS_CTRL, CURLHSTS_ENABLE);
|
| 138 | + easy_setopt(hnd, CURLOPT_DEBUGDATA, &libtest_debug_config); |
| 139 | + easy_setopt(hnd, CURLOPT_DEBUGFUNCTION, libtest_debug_cb); |
| 140 | + easy_setopt(hnd, CURLOPT_VERBOSE, 1L); |
127 | 141 | res = curl_easy_perform(hnd);
|
128 | 142 | curl_easy_cleanup(hnd);
|
129 | 143 | hnd = NULL;
|
|
0 commit comments