From daadcfd1de6d6369e0f2c0c1bca528995196ffaf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 19 Jan 2008 10:14:45 +0000 Subject: Dmitry Kurochkin fixed test case 530 (pipelining) --- tests/data/test530 | 22 ++++++++++++---------- tests/libtest/lib530.c | 5 ++++- 2 files changed, 16 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/data/test530 b/tests/data/test530 index 98064a3aa..40ac42fc6 100644 --- a/tests/data/test530 +++ b/tests/data/test530 @@ -7,19 +7,21 @@ Pipelining # Server-side - -pipe: 1 -pipe: 3 - - + HTTP/1.1 200 OK Date: Thu, 09 Nov 2010 14:49:00 GMT Server: test-server/fake Content-Length: 47 file contents should appear once for each file + + HTTP/1.1 200 OK + + Date: Thu, 09 Nov 2010 14:49:00 GMT + + Server: test-server/fake Content-Length: 47 @@ -36,7 +38,7 @@ Server: test-server/fake Content-Length: 47 file contents should appear once for each file - + # Client-side @@ -58,19 +60,19 @@ http://%HOSTIP:%HTTPPORT/path/530 # Verify data after the test has been "shot" -GET /path/530 HTTP/1.1 +GET /path/5300001 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Accept: */* -GET /path/530 HTTP/1.1 +GET /path/5300002 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Accept: */* -GET /path/530 HTTP/1.1 +GET /path/5300003 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Accept: */* -GET /path/530 HTTP/1.1 +GET /path/5300004 HTTP/1.1 Host: %HOSTIP:%HTTPPORT Accept: */* diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c index e339ab2cf..5d4a9b3ef 100644 --- a/tests/libtest/lib530.c +++ b/tests/libtest/lib530.c @@ -32,6 +32,7 @@ int test(char *URL) struct timeval mp_start; char ml_timedout = FALSE; char mp_timedout = FALSE; + char target_url[80]; if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) { fprintf(stderr, "curl_global_init() failed\n"); @@ -58,7 +59,9 @@ int test(char *URL) curl_global_cleanup(); return TEST_ERR_MAJOR_BAD + i; } - curl_easy_setopt(curl[i], CURLOPT_URL, URL); + snprintf(target_url, sizeof(target_url), "%s%04i", URL, i + 1); + target_url[sizeof(target_url) - 1] = '\0'; + curl_easy_setopt(curl[i], CURLOPT_URL, target_url); /* go verbose */ curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1); -- cgit v1.2.3