diff options
Diffstat (limited to 'src/daemon/daemontest_put.c')
-rw-r--r-- | src/daemon/daemontest_put.c | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/daemon/daemontest_put.c b/src/daemon/daemontest_put.c index ca64688b..dfcccb0a 100644 --- a/src/daemon/daemontest_put.c +++ b/src/daemon/daemontest_put.c | |||
@@ -32,6 +32,8 @@ | |||
32 | #include <string.h> | 32 | #include <string.h> |
33 | #include <time.h> | 33 | #include <time.h> |
34 | 34 | ||
35 | static int oneone; | ||
36 | |||
35 | static int apc_all(void * cls, | 37 | static int apc_all(void * cls, |
36 | const struct sockaddr * addr, | 38 | const struct sockaddr * addr, |
37 | socklen_t addrlen) { | 39 | socklen_t addrlen) { |
@@ -164,9 +166,14 @@ static int testInternalPut() { | |||
164 | curl_easy_setopt(c, | 166 | curl_easy_setopt(c, |
165 | CURLOPT_TIMEOUT, | 167 | CURLOPT_TIMEOUT, |
166 | 15L); | 168 | 15L); |
167 | curl_easy_setopt(c, | 169 | if (oneone) |
168 | CURLOPT_HTTP_VERSION, | 170 | curl_easy_setopt(c, |
169 | CURL_HTTP_VERSION_1_0); | 171 | CURLOPT_HTTP_VERSION, |
172 | CURL_HTTP_VERSION_1_1); | ||
173 | else | ||
174 | curl_easy_setopt(c, | ||
175 | CURLOPT_HTTP_VERSION, | ||
176 | CURL_HTTP_VERSION_1_0); | ||
170 | curl_easy_setopt(c, | 177 | curl_easy_setopt(c, |
171 | CURLOPT_CONNECTTIMEOUT, | 178 | CURLOPT_CONNECTTIMEOUT, |
172 | 15L); | 179 | 15L); |
@@ -246,9 +253,14 @@ static int testMultithreadedPut() { | |||
246 | curl_easy_setopt(c, | 253 | curl_easy_setopt(c, |
247 | CURLOPT_TIMEOUT, | 254 | CURLOPT_TIMEOUT, |
248 | 15L); | 255 | 15L); |
249 | curl_easy_setopt(c, | 256 | if (oneone) |
250 | CURLOPT_HTTP_VERSION, | 257 | curl_easy_setopt(c, |
251 | CURL_HTTP_VERSION_1_0); | 258 | CURLOPT_HTTP_VERSION, |
259 | CURL_HTTP_VERSION_1_1); | ||
260 | else | ||
261 | curl_easy_setopt(c, | ||
262 | CURLOPT_HTTP_VERSION, | ||
263 | CURL_HTTP_VERSION_1_0); | ||
252 | curl_easy_setopt(c, | 264 | curl_easy_setopt(c, |
253 | CURLOPT_CONNECTTIMEOUT, | 265 | CURLOPT_CONNECTTIMEOUT, |
254 | 15L); | 266 | 15L); |
@@ -339,9 +351,14 @@ static int testExternalPut() { | |||
339 | curl_easy_setopt(c, | 351 | curl_easy_setopt(c, |
340 | CURLOPT_TIMEOUT, | 352 | CURLOPT_TIMEOUT, |
341 | 15L); | 353 | 15L); |
342 | curl_easy_setopt(c, | 354 | if (oneone) |
343 | CURLOPT_HTTP_VERSION, | 355 | curl_easy_setopt(c, |
344 | CURL_HTTP_VERSION_1_0); | 356 | CURLOPT_HTTP_VERSION, |
357 | CURL_HTTP_VERSION_1_1); | ||
358 | else | ||
359 | curl_easy_setopt(c, | ||
360 | CURLOPT_HTTP_VERSION, | ||
361 | CURL_HTTP_VERSION_1_0); | ||
345 | curl_easy_setopt(c, | 362 | curl_easy_setopt(c, |
346 | CURLOPT_CONNECTTIMEOUT, | 363 | CURLOPT_CONNECTTIMEOUT, |
347 | 15L); | 364 | 15L); |
@@ -447,6 +464,7 @@ int main(int argc, | |||
447 | char * const * argv) { | 464 | char * const * argv) { |
448 | unsigned int errorCount = 0; | 465 | unsigned int errorCount = 0; |
449 | 466 | ||
467 | oneone = NULL != strstr(argv[0], "11"); | ||
450 | if (0 != curl_global_init(CURL_GLOBAL_WIN32)) | 468 | if (0 != curl_global_init(CURL_GLOBAL_WIN32)) |
451 | return 2; | 469 | return 2; |
452 | errorCount += testInternalPut(); | 470 | errorCount += testInternalPut(); |