diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-05-26 18:17:32 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2019-05-26 18:17:32 +0300 |
commit | 3894027826cbc6688428d8d54e2debe25b1d0661 (patch) | |
tree | 69c3fa8140a365da5b138aa4519b154e2063c7b8 /src/testzzuf/test_post.c | |
parent | 710d79a2ea4647d73172ba9aa032a4055bea14a8 (diff) | |
download | libmicrohttpd-3894027826cbc6688428d8d54e2debe25b1d0661.tar.gz libmicrohttpd-3894027826cbc6688428d8d54e2debe25b1d0661.zip |
tests: properly setup CURL options
Diffstat (limited to 'src/testzzuf/test_post.c')
-rw-r--r-- | src/testzzuf/test_post.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/testzzuf/test_post.c b/src/testzzuf/test_post.c index 836f3395..03b8e5a8 100644 --- a/src/testzzuf/test_post.c +++ b/src/testzzuf/test_post.c | |||
@@ -179,7 +179,7 @@ testInternalPost () | |||
179 | curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); | 179 | curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); |
180 | curl_easy_setopt (c, CURLOPT_POSTFIELDSIZE, strlen (POST_DATA)); | 180 | curl_easy_setopt (c, CURLOPT_POSTFIELDSIZE, strlen (POST_DATA)); |
181 | curl_easy_setopt (c, CURLOPT_POST, 1L); | 181 | curl_easy_setopt (c, CURLOPT_POST, 1L); |
182 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); | 182 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L); |
183 | curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); | 183 | curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); |
184 | if (oneone) | 184 | if (oneone) |
185 | curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); | 185 | curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); |
@@ -189,7 +189,7 @@ testInternalPost () | |||
189 | /* NOTE: use of CONNECTTIMEOUT without also | 189 | /* NOTE: use of CONNECTTIMEOUT without also |
190 | * setting NOSIGNAL results in really weird | 190 | * setting NOSIGNAL results in really weird |
191 | * crashes on my system! */ | 191 | * crashes on my system! */ |
192 | curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); | 192 | curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1L); |
193 | curl_easy_perform (c); | 193 | curl_easy_perform (c); |
194 | curl_easy_cleanup (c); | 194 | curl_easy_cleanup (c); |
195 | } | 195 | } |
@@ -231,7 +231,7 @@ testMultithreadedPost () | |||
231 | curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); | 231 | curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); |
232 | curl_easy_setopt (c, CURLOPT_POSTFIELDSIZE, strlen (POST_DATA)); | 232 | curl_easy_setopt (c, CURLOPT_POSTFIELDSIZE, strlen (POST_DATA)); |
233 | curl_easy_setopt (c, CURLOPT_POST, 1L); | 233 | curl_easy_setopt (c, CURLOPT_POST, 1L); |
234 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); | 234 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L); |
235 | curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); | 235 | curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); |
236 | if (oneone) | 236 | if (oneone) |
237 | curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); | 237 | curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); |
@@ -241,7 +241,7 @@ testMultithreadedPost () | |||
241 | /* NOTE: use of CONNECTTIMEOUT without also | 241 | /* NOTE: use of CONNECTTIMEOUT without also |
242 | * setting NOSIGNAL results in really weird | 242 | * setting NOSIGNAL results in really weird |
243 | * crashes on my system! */ | 243 | * crashes on my system! */ |
244 | curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); | 244 | curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1L); |
245 | curl_easy_perform (c); | 245 | curl_easy_perform (c); |
246 | curl_easy_cleanup (c); | 246 | curl_easy_cleanup (c); |
247 | } | 247 | } |
@@ -301,7 +301,7 @@ testExternalPost () | |||
301 | curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); | 301 | curl_easy_setopt (c, CURLOPT_POSTFIELDS, POST_DATA); |
302 | curl_easy_setopt (c, CURLOPT_POSTFIELDSIZE, strlen (POST_DATA)); | 302 | curl_easy_setopt (c, CURLOPT_POSTFIELDSIZE, strlen (POST_DATA)); |
303 | curl_easy_setopt (c, CURLOPT_POST, 1L); | 303 | curl_easy_setopt (c, CURLOPT_POST, 1L); |
304 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1); | 304 | curl_easy_setopt (c, CURLOPT_FAILONERROR, 1L); |
305 | curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); | 305 | curl_easy_setopt (c, CURLOPT_TIMEOUT_MS, CURL_TIMEOUT); |
306 | if (oneone) | 306 | if (oneone) |
307 | curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); | 307 | curl_easy_setopt (c, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); |
@@ -311,7 +311,7 @@ testExternalPost () | |||
311 | /* NOTE: use of CONNECTTIMEOUT without also | 311 | /* NOTE: use of CONNECTTIMEOUT without also |
312 | * setting NOSIGNAL results in really weird | 312 | * setting NOSIGNAL results in really weird |
313 | * crashes on my system! */ | 313 | * crashes on my system! */ |
314 | curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1); | 314 | curl_easy_setopt (c, CURLOPT_NOSIGNAL, 1L); |
315 | 315 | ||
316 | 316 | ||
317 | mret = curl_multi_add_handle (multi, c); | 317 | mret = curl_multi_add_handle (multi, c); |