mirror of https://github.com/moparisthebest/curl
Dmitry Kurochkin fixed test case 530 (pipelining)
This commit is contained in:
parent
62df0ff025
commit
daadcfd1de
|
@ -7,16 +7,24 @@ Pipelining
|
||||||
</info>
|
</info>
|
||||||
# Server-side
|
# Server-side
|
||||||
<reply>
|
<reply>
|
||||||
<servercmd>
|
<data1>
|
||||||
pipe: 1
|
|
||||||
pipe: 3
|
|
||||||
</servercmd>
|
|
||||||
<data>
|
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
Server: test-server/fake
|
Server: test-server/fake
|
||||||
Content-Length: 47
|
Content-Length: 47
|
||||||
|
|
||||||
|
file contents should appear once for each file
|
||||||
|
</data1>
|
||||||
|
<data2>
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
</data2>
|
||||||
|
<data3>
|
||||||
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
</data3>
|
||||||
|
<data4>
|
||||||
|
Server: test-server/fake
|
||||||
|
Content-Length: 47
|
||||||
|
|
||||||
file contents should appear once for each file
|
file contents should appear once for each file
|
||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
||||||
|
@ -30,13 +38,7 @@ Server: test-server/fake
|
||||||
Content-Length: 47
|
Content-Length: 47
|
||||||
|
|
||||||
file contents should appear once for each file
|
file contents should appear once for each file
|
||||||
HTTP/1.1 200 OK
|
</data4>
|
||||||
Date: Thu, 09 Nov 2010 14:49:00 GMT
|
|
||||||
Server: test-server/fake
|
|
||||||
Content-Length: 47
|
|
||||||
|
|
||||||
file contents should appear once for each file
|
|
||||||
</data>
|
|
||||||
</reply>
|
</reply>
|
||||||
|
|
||||||
# Client-side
|
# Client-side
|
||||||
|
@ -58,19 +60,19 @@ http://%HOSTIP:%HTTPPORT/path/530
|
||||||
# Verify data after the test has been "shot"
|
# Verify data after the test has been "shot"
|
||||||
<verify>
|
<verify>
|
||||||
<protocol>
|
<protocol>
|
||||||
GET /path/530 HTTP/1.1
|
GET /path/5300001 HTTP/1.1
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
|
||||||
GET /path/530 HTTP/1.1
|
GET /path/5300002 HTTP/1.1
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
|
||||||
GET /path/530 HTTP/1.1
|
GET /path/5300003 HTTP/1.1
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
|
||||||
GET /path/530 HTTP/1.1
|
GET /path/5300004 HTTP/1.1
|
||||||
Host: %HOSTIP:%HTTPPORT
|
Host: %HOSTIP:%HTTPPORT
|
||||||
Accept: */*
|
Accept: */*
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ int test(char *URL)
|
||||||
struct timeval mp_start;
|
struct timeval mp_start;
|
||||||
char ml_timedout = FALSE;
|
char ml_timedout = FALSE;
|
||||||
char mp_timedout = FALSE;
|
char mp_timedout = FALSE;
|
||||||
|
char target_url[80];
|
||||||
|
|
||||||
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
|
if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK) {
|
||||||
fprintf(stderr, "curl_global_init() failed\n");
|
fprintf(stderr, "curl_global_init() failed\n");
|
||||||
|
@ -58,7 +59,9 @@ int test(char *URL)
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
return TEST_ERR_MAJOR_BAD + i;
|
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 */
|
/* go verbose */
|
||||||
curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1);
|
curl_easy_setopt(curl[i], CURLOPT_VERBOSE, 1);
|
||||||
|
|
Loading…
Reference in New Issue