Package: libwww-curl-perl Version: 3.02-2+b3 Severity: normal Tags: patch
Hi, I am the maintainer of apt-cacher which I have recently converted to use libcurl via libwww-curl-perl. I have had a bug filed against apt-cacher (#462523) which is failing to limit bandwith usage since conversion to libcurl. Looking at the source of libwww-curl-perl, this appears to be because CURLOPT_MAX_RECV_SPEED_LARGE requires a curl_off_t parameter, but Curl.xs uses the default handler and casts it to long. I have created a very basic patch and verified that it fixes the test case for me here. It probably is not finished and requires some version #ifdefs, but seems a good starting point. I would be grateful if you would consider including a fix for this. Thanks, Mark --- WWW-Curl-3.02/Curl.xs 2004-04-20 14:24:18.000000000 +0100 +++ /usr/src/WWW-Curl-3.02/Curl.xs 2008-01-29 12:10:29.000000000 +0000 @@ -714,6 +714,18 @@ croak("value is not of type WWW::Curl::Form"); break; */ + + /* Expect curl_off_t */ + case CURLOPT_POSTFIELDSIZE_LARGE: + case CURLOPT_RESUME_FROM_LARGE: + case CURLOPT_INFILESIZE_LARGE: + case CURLOPT_MAXFILESIZE_LARGE: + case CURLOPT_MAX_SEND_SPEED_LARGE: + case CURLOPT_MAX_RECV_SPEED_LARGE: + { + RETVAL = curl_easy_setopt(self->curl, option, (curl_off_t)SvIV(value)); + }; + break; /* default cases */ default: -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (400, 'stable'), (300, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.24-mk7 Locale: LANG=en_GB, LC_CTYPE=iso_8859_1 (charmap=ISO-8859-1) (ignored: LC_ALL set to en_GB) Versions of packages libwww-curl-perl depends on: ii libc6 2.7-3 GNU C Library: Shared libraries ii libcurl3 7.17.1-1 Multi-protocol file transfer libra ii perl 5.8.8-12 Larry Wall's Practical Extraction ii perl-base [perlapi-5.8.8] 5.8.8-12 The Pathologically Eclectic Rubbis libwww-curl-perl recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]