]> granicus.if.org Git - curl/commitdiff
Added support for CURLINFO_HTTP_CONNECTCODE
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Aug 2003 23:15:41 +0000 (23:15 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 11 Aug 2003 23:15:41 +0000 (23:15 +0000)
lib/getinfo.c
lib/http.c
lib/urldata.h

index 9bd737020ebdd0852b53fabe2782af2dbe2b938e..a4b0fa602f0ec6b576e4dec7fc13ba42f1f772a7 100644 (file)
@@ -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;
index 35f7957254a5dcd5326b94dd8bb7f69c898cc9c5..90dc5a63bf43384a3fcc8a3dc5d0d68d4f1dedfe 100644 (file)
@@ -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 */
index a8c8dd13f1fb8ac3a76282b11223d848c2c92b59..2592357d2648fb852b04158507bb479a79eecc7d 100644 (file)
@@ -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,