php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54622 cURL speed limit options not implemented till present day.
Submitted: 2011-04-28 16:13 UTC Modified: 2011-04-29 12:44 UTC
From: md2k at visp dot net dot lb Assigned: pierrick (profile)
Status: Closed Package: cURL related
PHP Version: 5.3.6 OS: Linux (Gentoo)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: md2k at visp dot net dot lb
New email:
PHP Version: OS:

 

 [2011-04-28 16:13 UTC] md2k at visp dot net dot lb
Description:
------------
This request related to bug for previous version of PHP 
(http://bugs.php.net/bug.php?id=51815), but as i found i have same issue on php 
5.3.6.
Libcurl have  options as CURLOPT_MAX_RECV_SPEED_LARGE and 
CURLOPT_MAX_SEND_SPEED_LARGE, but seems them didn't work at current stable 
version. to reproduce the problem i use same script as in previous bug report.
 

Test script:
---------------
<?php

// create a new cURL resource
$ch = curl_init();

$fh = fopen("out.dat", "w");

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_MAX_RECV_SPEED_LARGE, 10240);
curl_setopt($ch, CURLOPT_URL, "http://bitcast-a.bitgravity.com/bitgravity/1MB");
curl_setopt($ch, CURLOPT_FILE, $fh);
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL
curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch);
fclose($fh);
?>


Expected result:
----------------
Script should download the link with approximate speed as 10kb/s and took around 
seconds...

Actual result:
--------------
Script download file with full speed which available for my connection, i.e. no 
any rate limit was assigned to curl task.  

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-28 16:17 UTC] md2k at visp dot net dot lb
i did check current snap php5.3-201104281230, it seems doesn't have this options 
too in cURL interface.
 [2011-04-29 03:45 UTC] pierrick@php.net
-Assigned To: +Assigned To: pierrick
 [2011-04-29 03:45 UTC] pierrick@php.net
This feature was added in trunk (5.4). I will double check with the 5.3 Release 
master to see if I can add this feature in the current version.
 [2011-04-29 10:06 UTC] md2k at visp dot net dot lb
Thank you Pierrick. i hope it will be possible to add even to 5.3.
 [2011-04-29 12:41 UTC] pierrick@php.net
Automatic comment from SVN on behalf of pierrick
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=310648
Log: Added support for CURLOPT_MAX_RECV_SPEED_LARGE and CURLOPT_MAX_SEND_SPEED_LARGE. FR #51815
# MFH. This addition was already committed to trunk and is backported as requested in #54622
 [2011-04-29 12:44 UTC] pierrick@php.net
-Status: Assigned +Status: Closed
 [2011-04-29 12:44 UTC] pierrick@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

This new feature is now backported in 5.3.7-dev
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Mar 14 15:01:30 2025 UTC