summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-07-04 13:34:23 +0000
committerAntony Dovgal <tony2001@php.net>2007-07-04 13:34:23 +0000
commit86a022f7c7a9bf256f9a4ae117551d377a69c354 (patch)
tree9a304bacc9b3d0b7ab0dc0780870e4d542b3d0ae
parenta3ba415e91bc6edc9bf9236d5edd892e93d6c7e9 (diff)
downloadphp-git-86a022f7c7a9bf256f9a4ae117551d377a69c354.tar.gz
MFH: add CURLINFO_PRIVATE & CURLOPT_PRIVATE
patch by Andrey A. Belashkov
-rw-r--r--NEWS2
-rw-r--r--ext/curl/interface.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 89b6daa065..88be231c8e 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,8 @@ PHP NEWS
Tony)
- Added missing format validator to unpack() function. (Ilia)
- Added missing error check inside bcpowmod(). (Ilia)
+- Added CURLOPT_PRIVATE & CURLINFO_PRIVATE constants.
+ (Andrey A. Belashkov, Tony)
- Fixed var_export() to use the new H modifier so that it can generate
parseable PHP code for floats, independent of the locale. (Derick)
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 8a909181b8..a5b53fc67a 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -482,6 +482,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);
@@ -511,6 +513,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);
@@ -1299,6 +1302,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:
@@ -1802,6 +1806,7 @@ PHP_FUNCTION(curl_getinfo)
} else {
option = Z_LVAL_PP(zoption);
switch (option) {
+ case CURLINFO_PRIVATE:
case CURLINFO_EFFECTIVE_URL:
case CURLINFO_CONTENT_TYPE: {
char *s_code = NULL;