]> git.pld-linux.org Git - packages/php.git/blame - php-curl-limit-speed.patch
- make it possible to coinstall phpXY-pdo-pgsql
[packages/php.git] / php-curl-limit-speed.patch
CommitLineData
b73449d9
KT
1--- php-5.2.5.orig/ext/curl/interface.c 2008-03-26 17:05:19.000000000 +0100
2+++ php-5.2.5/ext/curl/interface.c 2008-03-26 17:09:05.000000000 +0100
3@@ -462,6 +462,14 @@
4 REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY);
5 #endif
6 REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES);
7+
8+/* Added constants to support limiting the transfer speed in PHP */
9+/* Fixed by Tijnema (admin@tijnema.info) */
10+#if LIBCURL_VERSION_NUM > 0x070fff /* CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.16.0 */
11+ REGISTER_CURL_CONSTANT(CURLOPT_MAX_SEND_SPEED_LARGE);
12+ REGISTER_CURL_CONSTANT(CURLOPT_MAX_RECV_SPEED_LARGE);
13+#endif
14+
15 REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
16 REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
17 REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
18@@ -1288,6 +1296,12 @@
19 #if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
20 case CURLOPT_TCP_NODELAY:
21 #endif
22+/* Added case options to support limiting the transfer speed in PHP */
23+/* Fixed by Tijnema (admin@tijnema.info) */
24+#if LIBCURL_VERSION_NUM > 0x070fff /* CURLOPT_MAX_SEND_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE are available since curl 7.16.0 */
25+ case CURLOPT_MAX_SEND_SPEED_LARGE:
26+ case CURLOPT_MAX_RECV_SPEED_LARGE:
27+#endif
28 convert_to_long_ex(zvalue);
29 error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
30 break;
This page took 0.107678 seconds and 4 git commands to generate.