add CURLINFO_PRIVATE & CURLOPT_PRIVATE

patch by Andrey A. Belashkov
This commit is contained in:
Antony Dovgal 2007-07-04 13:33:01 +00:00
parent f3ca1b5170
commit 0c0166979d

View File

@ -480,6 +480,8 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_FTP_CREATE_MISSING_DIRS);
#endif
REGISTER_CURL_CONSTANT(CURLOPT_PRIVATE);
/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_TRAFFIC);
@ -509,6 +511,7 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_TIME);
REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_COUNT);
REGISTER_CURL_CONSTANT(CURLINFO_HEADER_OUT);
REGISTER_CURL_CONSTANT(CURLINFO_PRIVATE);
/* cURL protocol constants (curl_version) */
REGISTER_CURL_CONSTANT(CURL_VERSION_IPV6);
@ -1304,6 +1307,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
}
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
break;
case CURLOPT_PRIVATE:
case CURLOPT_URL:
case CURLOPT_PROXY:
case CURLOPT_USERPWD:
@ -1854,6 +1858,7 @@ PHP_FUNCTION(curl_getinfo)
}
} else {
switch (option) {
case CURLINFO_PRIVATE:
case CURLINFO_EFFECTIVE_URL:
case CURLINFO_CONTENT_TYPE: {
char *s_code = NULL;