Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MFH: add CURLINFO_PRIVATE & CURLOPT_PRIVATE

patch by Andrey A. Belashkov
  • Loading branch information...
commit 86a022f7c7a9bf256f9a4ae117551d377a69c354 1 parent a3ba415
Antony Dovgal authored July 04, 2007
2  NEWS
@@ -23,6 +23,8 @@ PHP                                                                        NEWS
23 23
   Tony)
24 24
 - Added missing format validator to unpack() function. (Ilia)
25 25
 - Added missing error check inside bcpowmod(). (Ilia)
  26
+- Added CURLOPT_PRIVATE & CURLINFO_PRIVATE constants. 
  27
+  (Andrey A. Belashkov, Tony)
26 28
 
27 29
 - Fixed var_export() to use the new H modifier so that it can generate
28 30
   parseable PHP code for floats, independent of the locale. (Derick)
5  ext/curl/interface.c
@@ -482,6 +482,8 @@ PHP_MINIT_FUNCTION(curl)
482 482
 	REGISTER_CURL_CONSTANT(CURLOPT_FTP_CREATE_MISSING_DIRS);
483 483
 #endif
484 484
 
  485
+	REGISTER_CURL_CONSTANT(CURLOPT_PRIVATE);
  486
+
485 487
 	/* Constants effecting the way CURLOPT_CLOSEPOLICY works */
486 488
 	REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
487 489
 	REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_TRAFFIC);
@@ -511,6 +513,7 @@ PHP_MINIT_FUNCTION(curl)
511 513
 	REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_TIME);
512 514
 	REGISTER_CURL_CONSTANT(CURLINFO_REDIRECT_COUNT);
513 515
 	REGISTER_CURL_CONSTANT(CURLINFO_HEADER_OUT);
  516
+	REGISTER_CURL_CONSTANT(CURLINFO_PRIVATE);
514 517
 
515 518
 	/* cURL protocol constants (curl_version) */
516 519
 	REGISTER_CURL_CONSTANT(CURL_VERSION_IPV6);
@@ -1299,6 +1302,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
1299 1302
 			}
1300 1303
 			error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
1301 1304
 			break;
  1305
+		case CURLOPT_PRIVATE:
1302 1306
 		case CURLOPT_URL:
1303 1307
 		case CURLOPT_PROXY:
1304 1308
 		case CURLOPT_USERPWD:
@@ -1802,6 +1806,7 @@ PHP_FUNCTION(curl_getinfo)
1802 1806
 	} else {
1803 1807
 		option = Z_LVAL_PP(zoption);
1804 1808
 		switch (option) {
  1809
+			case CURLINFO_PRIVATE:
1805 1810
 			case CURLINFO_EFFECTIVE_URL: 
1806 1811
 			case CURLINFO_CONTENT_TYPE: {
1807 1812
  				char *s_code = NULL;

0 notes on commit 86a022f

Please sign in to comment.
Something went wrong with that request. Please try again.