diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-08-11 23:15:41 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-08-11 23:15:41 +0000 |
commit | 27619fc450599bf6c0a152dd9206d8559603fc15 (patch) | |
tree | ba8a267f5815f42c5a05e2c946e0e6752f3fe1de /lib | |
parent | 96fecba190b3968a2c076272e3cd80834dd66e66 (diff) |
Added support for CURLINFO_HTTP_CONNECTCODE
Diffstat (limited to 'lib')
-rw-r--r-- | lib/getinfo.c | 3 | ||||
-rw-r--r-- | lib/http.c | 2 | ||||
-rw-r--r-- | lib/urldata.h | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/lib/getinfo.c b/lib/getinfo.c index 9bd737020..a4b0fa602 100644 --- a/lib/getinfo.c +++ b/lib/getinfo.c @@ -106,6 +106,9 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...) case CURLINFO_HTTP_CODE: *param_longp = data->info.httpcode; break; + case CURLINFO_HTTP_CONNECTCODE: + *param_longp = data->info.httpproxycode; + break; case CURLINFO_FILETIME: *param_longp = data->info.filetime; break; diff --git a/lib/http.c b/lib/http.c index 35f795725..90dc5a63b 100644 --- a/lib/http.c +++ b/lib/http.c @@ -556,6 +556,8 @@ CURLcode Curl_ConnectHTTPProxyTunnel(struct connectdata *conn, if(error) return CURLE_RECV_ERROR; + data->info.httpproxycode = httperror; + if(200 != httperror) { if(407 == httperror) /* Added Nov 6 1998 */ diff --git a/lib/urldata.h b/lib/urldata.h index a8c8dd13f..2592357d2 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -566,6 +566,7 @@ struct connectdata { */ struct PureInfo { int httpcode; + int httpproxycode; int httpversion; 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, |