Skip to content

Commit

Permalink
MFH: add CURLINFO_PRIVATE & CURLOPT_PRIVATE
Browse files Browse the repository at this point in the history
patch by Andrey A. Belashkov
  • Loading branch information
tony2001 committed Jul 4, 2007
1 parent a3ba415 commit 86a022f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions ext/curl/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 86a022f

Please sign in to comment.