Commit: e3c88d16b400cc4f69c5533239343bf14220ae2c Author: Pierrick Charron <pierr...@php.net> Fri, 21 Dec 2012 19:27:51 -0500 Parents: 52e7b0ce2cb9a8276a423920d7bf6f0f8bffd4df 5499c7d201ad22f551dfc370ae09132acf4f75ec Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e3c88d16b400cc4f69c5533239343bf14220ae2c Log: Merge branch 'PHP-5.4' into PHP-5.5 * PHP-5.4: Update NEWS file Fixed bug #63352 (Can't enable hostname validation when using curl stream wrappers) CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST) Bugs: https://bugs.php.net/63352 Changed paths: MM ext/curl/interface.c Diff: diff --cc ext/curl/interface.c index 9e5d06b,1106037..8a8333d --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@@ -2015,142 -1685,98 +2015,148 @@@ static int _php_curl_setopt(php_curl *c switch (option) { /* Long options */ case CURLOPT_SSL_VERIFYHOST: - if(Z_TYPE_PP(zvalue)==IS_BOOL && Z_BVAL_PP(zvalue)) { - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST set to true which disables common name validation (setting CURLOPT_SSL_VERIFYHOST to 2 enables common name validation)"); + if(Z_BVAL_PP(zvalue) == 1) { + #if LIBCURL_VERSION_NUM <= 0x071c00 /* 7.28.0 */ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead"); -#else - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead"); - error = curl_easy_setopt(ch->cp, option, 2); - break; -#endif - } - case CURLOPT_INFILESIZE: - case CURLOPT_VERBOSE: - case CURLOPT_HEADER: - case CURLOPT_NOPROGRESS: - case CURLOPT_NOBODY: - case CURLOPT_FAILONERROR: - case CURLOPT_UPLOAD: - case CURLOPT_POST: - case CURLOPT_FTPLISTONLY: - case CURLOPT_FTPAPPEND: - case CURLOPT_NETRC: - case CURLOPT_PUT: -#if CURLOPT_MUTE != 0 - case CURLOPT_MUTE: -#endif - case CURLOPT_TIMEOUT: -#if LIBCURL_VERSION_NUM > 0x071002 - case CURLOPT_TIMEOUT_MS: ++ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST with value 1 is deprecated and will be removed as of libcurl 7.28.1. It is recommended to use value 2 instead"); ++#else ++ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "CURLOPT_SSL_VERIFYHOST no longer accepts the value 1, value 2 will be used instead"); ++ error = curl_easy_setopt(ch->cp, option, 2); ++ break; + #endif - case CURLOPT_FTP_USE_EPSV: - case CURLOPT_LOW_SPEED_LIMIT: - case CURLOPT_SSLVERSION: - case CURLOPT_LOW_SPEED_TIME: - case CURLOPT_RESUME_FROM: - case CURLOPT_TIMEVALUE: - case CURLOPT_TIMECONDITION: - case CURLOPT_TRANSFERTEXT: - case CURLOPT_HTTPPROXYTUNNEL: - case CURLOPT_FILETIME: - case CURLOPT_MAXREDIRS: - case CURLOPT_MAXCONNECTS: + } + case CURLOPT_AUTOREFERER: + case CURLOPT_BUFFERSIZE: case CURLOPT_CLOSEPOLICY: - case CURLOPT_FRESH_CONNECT: - case CURLOPT_FORBID_REUSE: case CURLOPT_CONNECTTIMEOUT: -#if LIBCURL_VERSION_NUM > 0x071002 - case CURLOPT_CONNECTTIMEOUT_MS: -#endif - case CURLOPT_SSL_VERIFYPEER: + case CURLOPT_COOKIESESSION: + case CURLOPT_CRLF: + case CURLOPT_DNS_CACHE_TIMEOUT: case CURLOPT_DNS_USE_GLOBAL_CACHE: - case CURLOPT_NOSIGNAL: - case CURLOPT_PROXYTYPE: - case CURLOPT_BUFFERSIZE: + case CURLOPT_FAILONERROR: + case CURLOPT_FILETIME: + case CURLOPT_FORBID_REUSE: + case CURLOPT_FRESH_CONNECT: + case CURLOPT_FTP_USE_EPRT: + case CURLOPT_FTP_USE_EPSV: + case CURLOPT_HEADER: case CURLOPT_HTTPGET: + case CURLOPT_HTTPPROXYTUNNEL: case CURLOPT_HTTP_VERSION: - case CURLOPT_CRLF: - case CURLOPT_DNS_CACHE_TIMEOUT: + case CURLOPT_INFILESIZE: + case CURLOPT_LOW_SPEED_LIMIT: + case CURLOPT_LOW_SPEED_TIME: + case CURLOPT_MAXCONNECTS: + case CURLOPT_MAXREDIRS: + case CURLOPT_NETRC: + case CURLOPT_NOBODY: + case CURLOPT_NOPROGRESS: + case CURLOPT_NOSIGNAL: + case CURLOPT_PORT: + case CURLOPT_POST: case CURLOPT_PROXYPORT: - case CURLOPT_FTP_USE_EPRT: -#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */ + case CURLOPT_PROXYTYPE: + case CURLOPT_PUT: + case CURLOPT_RESUME_FROM: + case CURLOPT_SSLVERSION: + case CURLOPT_SSL_VERIFYPEER: + case CURLOPT_TIMECONDITION: + case CURLOPT_TIMEOUT: + case CURLOPT_TIMEVALUE: + case CURLOPT_TRANSFERTEXT: + case CURLOPT_UNRESTRICTED_AUTH: + case CURLOPT_UPLOAD: + case CURLOPT_VERBOSE: +#if LIBCURL_VERSION_NUM >= 0x070a06 /* Available since 7.10.6 */ case CURLOPT_HTTPAUTH: #endif -#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH & CURLOPT_FTP_CREATE_MISSING_DIRS are available since curl 7.10.7 */ - case CURLOPT_PROXYAUTH: +#if LIBCURL_VERSION_NUM >= 0x070a07 /* Available since 7.10.7 */ case CURLOPT_FTP_CREATE_MISSING_DIRS: + case CURLOPT_PROXYAUTH: #endif - -#if LIBCURL_VERSION_NUM >= 0x070c02 +#if LIBCURL_VERSION_NUM >= 0x070a08 /* Available since 7.10.8 */ + case CURLOPT_FTP_RESPONSE_TIMEOUT: + case CURLOPT_IPRESOLVE: + case CURLOPT_MAXFILESIZE: +#endif +#if LIBCURL_VERSION_NUM >= 0x070b02 /* Available since 7.11.2 */ + case CURLOPT_TCP_NODELAY: +#endif +#if LIBCURL_VERSION_NUM >= 0x070c02 /* Available since 7.12.2 */ case CURLOPT_FTPSSLAUTH: #endif -#if LIBCURL_VERSION_NUM > 0x070b00 +#if LIBCURL_VERSION_NUM >= 0x070e01 /* Available since 7.14.1 */ + case CURLOPT_IGNORE_CONTENT_LENGTH: +#endif +#if LIBCURL_VERSION_NUM >= 0x070f00 /* Available since 7.15.0 */ + case CURLOPT_FTP_SKIP_PASV_IP: +#endif +#if LIBCURL_VERSION_NUM >= 0x070f01 /* Available since 7.15.1 */ + case CURLOPT_FTP_FILEMETHOD: +#endif +#if LIBCURL_VERSION_NUM >= 0x070f02 /* Available since 7.15.2 */ + case CURLOPT_CONNECT_ONLY: + case CURLOPT_LOCALPORT: + case CURLOPT_LOCALPORTRANGE: +#endif +#if LIBCURL_VERSION_NUM >= 0x071000 /* Available since 7.16.0 */ + case CURLOPT_SSL_SESSIONID_CACHE: +#endif +#if LIBCURL_VERSION_NUM >= 0x071001 /* Available since 7.16.1 */ + case CURLOPT_FTP_SSL_CCC: + case CURLOPT_SSH_AUTH_TYPES: +#endif +#if LIBCURL_VERSION_NUM >= 0x071002 /* Available since 7.16.2 */ + case CURLOPT_CONNECTTIMEOUT_MS: + case CURLOPT_HTTP_CONTENT_DECODING: + case CURLOPT_HTTP_TRANSFER_DECODING: + case CURLOPT_TIMEOUT_MS: +#endif +#if LIBCURL_VERSION_NUM >= 0x071004 /* Available since 7.16.4 */ + case CURLOPT_NEW_DIRECTORY_PERMS: + case CURLOPT_NEW_FILE_PERMS: +#endif +#if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */ + case CURLOPT_USE_SSL: +#elif LIBCURL_VERSION_NUM >= 0x070b00 /* Available since 7.11.0 */ case CURLOPT_FTP_SSL: +#endif +#if LIBCURL_VERSION_NUM >= 0x071100 /* Available since 7.17.0 */ + case CURLOPT_APPEND: + case CURLOPT_DIRLISTONLY: +#else + case CURLOPT_FTPAPPEND: + case CURLOPT_FTPLISTONLY: #endif - case CURLOPT_UNRESTRICTED_AUTH: - case CURLOPT_PORT: - case CURLOPT_AUTOREFERER: - case CURLOPT_COOKIESESSION: -#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */ - case CURLOPT_TCP_NODELAY: +#if LIBCURL_VERSION_NUM >= 0x071200 /* Available since 7.18.0 */ + case CURLOPT_PROXY_TRANSFER_MODE: #endif -#if LIBCURL_VERSION_NUM >= 0x71304 - case CURLOPT_REDIR_PROTOCOLS: +#if LIBCURL_VERSION_NUM >= 0x071300 /* Available since 7.19.0 */ + case CURLOPT_ADDRESS_SCOPE: +#endif +#if LIBCURL_VERSION_NUM > 0x071301 /* Available since 7.19.1 */ + case CURLOPT_CERTINFO: +#endif +#if LIBCURL_VERSION_NUM >= 0x071304 /* Available since 7.19.4 */ + case CURLOPT_NOPROXY: case CURLOPT_PROTOCOLS: + case CURLOPT_REDIR_PROTOCOLS: + case CURLOPT_SOCKS5_GSSAPI_NEC: + case CURLOPT_TFTP_BLKSIZE: #endif -#if LIBCURL_VERSION_NUM > 0x070a07 /* CURLOPT_IPRESOLVE is available since curl 7.10.8 */ - case CURLOPT_IPRESOLVE: +#if LIBCURL_VERSION_NUM >= 0x071400 /* Available since 7.20.0 */ + case CURLOPT_FTP_USE_PRET: + case CURLOPT_RTSP_CLIENT_CSEQ: + case CURLOPT_RTSP_REQUEST: + case CURLOPT_RTSP_SERVER_CSEQ: #endif -#if LIBCURL_VERSION_NUM >= 0x070f01 - case CURLOPT_FTP_FILEMETHOD: - case CURLOPT_FTP_SKIP_PASV_IP: +#if LIBCURL_VERSION_NUM >= 0x071500 /* Available since 7.21.0 */ + case CURLOPT_WILDCARDMATCH: #endif -#if LIBCURL_VERSION_NUM > 0x071301 - case CURLOPT_CERTINFO: +#if LIBCURL_VERSION_NUM >= 0x071504 /* Available since 7.21.4 */ + case CURLOPT_TLSAUTH_TYPE: +#endif +#if CURLOPT_MUTE != 0 + case CURLOPT_MUTE: #endif convert_to_long_ex(zvalue); #if LIBCURL_VERSION_NUM >= 0x71304 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php