mirror of
https://github.com/curl/curl.git
synced 2026-08-04 04:20:00 +03:00
Added test case 217 that verified CURLINFO_HTTP_CONNECTCODE, and I made the
-w option support 'http_connect' to make it easier to verify!
This commit is contained in:
parent
444f6427b8
commit
4ba1eb26fa
5 changed files with 65 additions and 1 deletions
|
|
@ -52,6 +52,7 @@ typedef enum {
|
|||
VAR_SPEED_DOWNLOAD,
|
||||
VAR_SPEED_UPLOAD,
|
||||
VAR_HTTP_CODE,
|
||||
VAR_HTTP_CODE_PROXY,
|
||||
VAR_HEADER_SIZE,
|
||||
VAR_REQUEST_SIZE,
|
||||
VAR_EFFECTIVE_URL,
|
||||
|
|
@ -71,6 +72,7 @@ struct variable {
|
|||
static const struct variable replacements[]={
|
||||
{"url_effective", VAR_EFFECTIVE_URL},
|
||||
{"http_code", VAR_HTTP_CODE},
|
||||
{"http_connect", VAR_HTTP_CODE_PROXY},
|
||||
{"time_total", VAR_TOTAL_TIME},
|
||||
{"time_namelookup", VAR_NAMELOOKUP_TIME},
|
||||
{"time_connect", VAR_CONNECT_TIME},
|
||||
|
|
@ -127,6 +129,12 @@ void ourWriteOut(CURL *curl, char *writeinfo)
|
|||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &longinfo))
|
||||
fprintf(stream, "%03ld", longinfo);
|
||||
break;
|
||||
case VAR_HTTP_CODE_PROXY:
|
||||
if(CURLE_OK ==
|
||||
curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE,
|
||||
&longinfo))
|
||||
fprintf(stream, "%03ld", longinfo);
|
||||
break;
|
||||
case VAR_HEADER_SIZE:
|
||||
if(CURLE_OK ==
|
||||
curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &longinfo))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue