mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:33:32 +03:00
parent
b7c9166c4c
commit
b70e8f4b9b
8 changed files with 17 additions and 17 deletions
|
|
@ -90,16 +90,16 @@ static int onetest(CURL *curl, const char *url, const struct testparams *p,
|
|||
unsigned int replyselector;
|
||||
char urlbuf[256];
|
||||
|
||||
replyselector = (p->flags & F_CONTENTRANGE) ? 1: 0;
|
||||
replyselector = (p->flags & F_CONTENTRANGE) ? 1 : 0;
|
||||
if(p->flags & F_HTTP416)
|
||||
replyselector += 2;
|
||||
msnprintf(urlbuf, sizeof(urlbuf), "%s%04u", url, replyselector);
|
||||
test_setopt(curl, CURLOPT_URL, urlbuf);
|
||||
test_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
test_setopt(curl, CURLOPT_RESUME_FROM, (p->flags & F_RESUME) ? 3: 0);
|
||||
test_setopt(curl, CURLOPT_RESUME_FROM, (p->flags & F_RESUME) ? 3 : 0);
|
||||
test_setopt(curl, CURLOPT_RANGE, !(p->flags & F_RESUME) ?
|
||||
"3-1000000": (char *) NULL);
|
||||
test_setopt(curl, CURLOPT_FAILONERROR, (p->flags & F_FAIL) ? 1: 0);
|
||||
test_setopt(curl, CURLOPT_FAILONERROR, (p->flags & F_FAIL) ? 1 : 0);
|
||||
hasbody = 0;
|
||||
res = curl_easy_perform(curl);
|
||||
if(res != p->result) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp)
|
|||
return CURL_READFUNC_PAUSE;
|
||||
case 2:
|
||||
delta = time(NULL) - pooh->origin;
|
||||
*ptr = delta >= PAUSE_TIME ? '\x42': '\x41'; /* ASCII A or B. */
|
||||
*ptr = delta >= PAUSE_TIME ? '\x42' : '\x41'; /* ASCII A or B. */
|
||||
return 1;
|
||||
case 3:
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1021,7 +1021,7 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
|
|||
char responsedump[256];
|
||||
|
||||
msnprintf(responsedump, sizeof(responsedump), "%s/%s",
|
||||
logdir, is_proxy ? RESPONSE_PROXY_DUMP:RESPONSE_DUMP);
|
||||
logdir, is_proxy ? RESPONSE_PROXY_DUMP : RESPONSE_DUMP);
|
||||
|
||||
switch(req->rcmd) {
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue