aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-08-20 15:42:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-08-20 15:42:24 +0000
commit5974309d10e2db1bddc49ed6cca2f372bfc739ce (patch)
treebc52e172f318f93e9920f320975de77a7616f636
parentd00e4a377b4a7c432c15670b9316ceb53a9ad08c (diff)
CURLINFO_RESPONSE_CODE replaces CURLINFO_HTTP_CODE
-rw-r--r--include/curl/curl.h6
-rw-r--r--lib/getinfo.c2
-rw-r--r--src/writeenv.c2
-rw-r--r--src/writeout.c2
4 files changed, 8 insertions, 4 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h
index f3593f424..b856fa956 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -979,7 +979,7 @@ time_t curl_getdate(const char *p, const time_t *now);
typedef enum {
CURLINFO_NONE, /* first, never use this */
CURLINFO_EFFECTIVE_URL = CURLINFO_STRING + 1,
- CURLINFO_HTTP_CODE = CURLINFO_LONG + 2,
+ CURLINFO_RESPONSE_CODE = CURLINFO_LONG + 2,
CURLINFO_TOTAL_TIME = CURLINFO_DOUBLE + 3,
CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
@@ -1005,6 +1005,10 @@ typedef enum {
CURLINFO_LASTONE = 23
} CURLINFO;
+/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
+ CURLINFO_HTTP_CODE */
+#define CURLINFO_HTTP_CODE CURLINFO_RESPONSE_CODE
+
typedef enum {
CURLCLOSEPOLICY_NONE, /* first, never use this */
diff --git a/lib/getinfo.c b/lib/getinfo.c
index a4b0fa602..29da0dc3c 100644
--- a/lib/getinfo.c
+++ b/lib/getinfo.c
@@ -103,7 +103,7 @@ CURLcode Curl_getinfo(struct SessionHandle *data, CURLINFO info, ...)
case CURLINFO_EFFECTIVE_URL:
*param_charp = data->change.url?data->change.url:(char *)"";
break;
- case CURLINFO_HTTP_CODE:
+ case CURLINFO_RESPONSE_CODE:
*param_longp = data->info.httpcode;
break;
case CURLINFO_HTTP_CONNECTCODE:
diff --git a/src/writeenv.c b/src/writeenv.c
index fefac5a62..8932b5073 100644
--- a/src/writeenv.c
+++ b/src/writeenv.c
@@ -44,7 +44,7 @@ struct
} variables[14] =
{
{"curl_url_effective", CURLINFO_EFFECTIVE_URL, writeenv_STRING},
- {"curl_http_code", CURLINFO_HTTP_CODE, writeenv_LONG},
+ {"curl_http_code", CURLINFO_RESPONSE_CODE, writeenv_LONG},
{"curl_time_total", CURLINFO_TOTAL_TIME, writeenv_DOUBLE},
{"curl_time_namelookup", CURLINFO_NAMELOOKUP_TIME, writeenv_DOUBLE},
{"curl_time_connect", CURLINFO_CONNECT_TIME, writeenv_DOUBLE},
diff --git a/src/writeout.c b/src/writeout.c
index 5a7628998..6c86489c3 100644
--- a/src/writeout.c
+++ b/src/writeout.c
@@ -118,7 +118,7 @@ void ourWriteOut(CURL *curl, char *writeinfo)
break;
case VAR_HTTP_CODE:
if(CURLE_OK ==
- curl_easy_getinfo(curl, CURLINFO_HTTP_CODE, &longinfo))
+ curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &longinfo))
fprintf(stream, "%03d", longinfo);
break;
case VAR_HEADER_SIZE: