]> git.pld-linux.org Git - packages/php.git/commitdiff
This patch allow to use CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_RECV_SPEED_LARGE...
authorKrzysztof Taraszka <dzimi@pld-linux.org>
Wed, 26 Mar 2008 16:23:16 +0000 (16:23 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-curl-limit-speed.patch -> 1.1

php-curl-limit-speed.patch [new file with mode: 0644]

diff --git a/php-curl-limit-speed.patch b/php-curl-limit-speed.patch
new file mode 100644 (file)
index 0000000..8348dd4
--- /dev/null
@@ -0,0 +1,30 @@
+--- php-5.2.5.orig/ext/curl/interface.c        2008-03-26 17:05:19.000000000 +0100
++++ php-5.2.5/ext/curl/interface.c     2008-03-26 17:09:05.000000000 +0100
+@@ -462,6 +462,14 @@
+       REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY);
+ #endif
+       REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES);
++
++/* Added constants to support limiting the transfer speed in PHP */
++/* Fixed by Tijnema (admin@tijnema.info) */
++#if LIBCURL_VERSION_NUM > 0x070fff /* CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.16.0 */
++      REGISTER_CURL_CONSTANT(CURLOPT_MAX_SEND_SPEED_LARGE);
++      REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE);
++#endif
++
+       REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
+       REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
+       REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
+@@ -1288,6 +1296,12 @@
+ #if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
+               case CURLOPT_TCP_NODELAY:
+ #endif
++/* Added case options to support limiting the transfer speed in PHP */
++/* Fixed by Tijnema (admin@tijnema.info) */
++#if LIBCURL_VERSION_NUM > 0x070fff /* CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.16.0 */
++              case CURLOPT_MAX_SEND_SPEED_LARGE:
++              case CURLOPT_MAX_RECV_SPEED_LARGE:
++#endif
+                       convert_to_long_ex(zvalue);
+                       error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
+                       break;
This page took 0.473515 seconds and 4 git commands to generate.