1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-11 07:39:50 -04:00

Added support for CURLINFO_HTTP_CONNECTCODE

This commit is contained in:
Daniel Stenberg 2003-08-11 23:15:41 +00:00
parent 96fecba190
commit 27619fc450
3 changed files with 6 additions and 0 deletions

View File

@ -106,6 +106,9 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
case CURLINFO_HTTP_CODE: case CURLINFO_HTTP_CODE:
*param_longp = data->info.httpcode; *param_longp = data->info.httpcode;
break; break;
case CURLINFO_HTTP_CONNECTCODE:
*param_longp = data->info.httpproxycode;
break;
case CURLINFO_FILETIME: case CURLINFO_FILETIME:
*param_longp = data->info.filetime; *param_longp = data->info.filetime;
break; break;

View File

@ -556,6 +556,8 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn,
if(error) if(error)
return CURLE_RECV_ERROR; return CURLE_RECV_ERROR;
data->info.httpproxycode = httperror;
if(200 != httperror) { if(200 != httperror) {
if(407 == httperror) if(407 == httperror)
/* Added Nov 6 1998 */ /* Added Nov 6 1998 */

View File

@ -566,6 +566,7 @@ struct connectdata {
*/ */
struct PureInfo { struct PureInfo {
int httpcode; int httpcode;
int httpproxycode;
int httpversion; int httpversion;
long filetime; /* If requested, this is might get set. Set to -1 if the time long filetime; /* If requested, this is might get set. Set to -1 if the time
was unretrievable. We cannot have this of type time_t, was unretrievable. We cannot have this of type time_t,