Permalink
Browse files

Add new curl options

Addes new curl options CURLOPT_TELNETOPTIONS, CURLOPT_GSSAPI_DELEGATION,
CURLOPT_ACCEPTTIMEOUT_MS, CURLOPT_SSL_OPTIONS, CURLOPT_TCP_KEEPALIVE,
CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL.
  • Loading branch information...
1 parent 8b67981 commit 722b8fb80eb3a4a5f8fa5e8dd91456148e1f755a @adoy adoy committed Dec 28, 2012
Showing with 33 additions and 0 deletions.
  1. +3 −0 NEWS
  2. +30 −0 ext/curl/interface.c
View
3 NEWS
@@ -11,6 +11,9 @@ PHP NEWS
. Added new functions curl_escape, curl_multi_setopt, curl_multi_strerror
curl_pause, curl_reset, curl_share_close, curl_share_init,
curl_share_setopt curl_strerror and curl_unescape. (Pierrick)
+ . Addes new curl options CURLOPT_TELNETOPTIONS, CURLOPT_GSSAPI_DELEGATION,
+ CURLOPT_ACCEPTTIMEOUT_MS, CURLOPT_SSL_OPTIONS, CURLOPT_TCP_KEEPALIVE,
+ CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL. (Pierrick)
18 Dec 2012, PHP 5.5.0 Alpha 2
View
@@ -690,6 +690,7 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYHOST);
REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER);
REGISTER_CURL_CONSTANT(CURLOPT_STDERR);
+ REGISTER_CURL_CONSTANT(CURLOPT_TELNETOPTIONS);
REGISTER_CURL_CONSTANT(CURLOPT_TIMECONDITION);
REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT);
REGISTER_CURL_CONSTANT(CURLOPT_TIMEVALUE);
@@ -732,6 +733,7 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_SET_BINARY);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_STOR_FILE);
REGISTER_CURL_CONSTANT(CURLE_FTP_COULDNT_USE_REST);
+ REGISTER_CURL_CONSTANT(CURLE_FTP_PARTIAL_FILE);
REGISTER_CURL_CONSTANT(CURLE_FTP_PORT_FAILED);
REGISTER_CURL_CONSTANT(CURLE_FTP_QUOTE_ERROR);
REGISTER_CURL_CONSTANT(CURLE_FTP_USER_PASSWORD_INCORRECT);
@@ -1156,12 +1158,24 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_TRANSFER_ENCODING);
#endif
+#if LIBCURL_VERSION_NUM >= 0x071600 /* Available since 7.22.0 */
+ REGISTER_CURL_CONSTANT(CURLGSSAPI_DELEGATION_FLAG);
+ REGISTER_CURL_CONSTANT(CURLGSSAPI_DELEGATION_POLICY_FLAG);
+ REGISTER_CURL_CONSTANT(CURLOPT_GSSAPI_DELEGATION);
+#endif
+
#if LIBCURL_VERSION_NUM >= 0x071800 /* Available since 7.24.0 */
+ REGISTER_CURL_CONSTANT(CURLOPT_ACCEPTTIMEOUT_MS);
REGISTER_CURL_CONSTANT(CURLOPT_DNS_SERVERS);
#endif
#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */
REGISTER_CURL_CONSTANT(CURLOPT_MAIL_AUTH);
+ REGISTER_CURL_CONSTANT(CURLOPT_SSL_OPTIONS);
+ REGISTER_CURL_CONSTANT(CURLOPT_TCP_KEEPALIVE);
+ REGISTER_CURL_CONSTANT(CURLOPT_TCP_KEEPIDLE);
+ REGISTER_CURL_CONSTANT(CURLOPT_TCP_KEEPINTVL);
+ REGISTER_CURL_CONSTANT(CURLSSLOPT_ALLOW_BEAST);
#endif
#if CURLOPT_FTPASCII != 0
@@ -2210,6 +2224,18 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
#if LIBCURL_VERSION_NUM >= 0x071504 /* Available since 7.21.4 */
case CURLOPT_TLSAUTH_TYPE:
#endif
+#if LIBCURL_VERSION_NUM >= 0x071600 /* Available since 7.22.0 */
+ case CURLOPT_GSSAPI_DELEGATION:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071800 /* Available since 7.24.0 */
+ case CURLOPT_ACCEPTTIMEOUT_MS:
+#endif
+#if LIBCURL_VERSION_NUM >= 0x071900 /* Available since 7.25.0 */
+ case CURLOPT_SSL_OPTIONS:
+ case CURLOPT_TCP_KEEPALIVE:
+ case CURLOPT_TCP_KEEPIDLE:
+ case CURLOPT_TCP_KEEPINTVL:
+#endif
#if CURLOPT_MUTE != 0
case CURLOPT_MUTE:
#endif
@@ -2416,6 +2442,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
case CURLOPT_POSTQUOTE:
case CURLOPT_PREQUOTE:
case CURLOPT_QUOTE:
+ case CURLOPT_TELNETOPTIONS:
#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
case CURLOPT_MAIL_RCPT:
#endif
@@ -2446,6 +2473,9 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
case CURLOPT_PREQUOTE:
name = "CURLOPT_PREQUOTE";
break;
+ case CURLOPT_TELNETOPTIONS:
+ name = "CURLOPT_TELNETOPTIONS";
+ break;
#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */
case CURLOPT_MAIL_RCPT:
name = "CURLOPT_MAIL_RCPT";

0 comments on commit 722b8fb

Please sign in to comment.