Bug 928370

Summary: [RFE] support setopt(pycurl.RANGE, None)
Product: [Fedora] Fedora Reporter: Zdeněk Pavlas <zpavlas>
Component: python-pycurlAssignee: Kamil Dudka <kdudka>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jzeleny, kdudka
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pycurl-7.19.0-16.20120408git9b8f4e38.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-09 14:23:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
add support to unset options, add CURLOPT_RANGE to the list. none

Description Zdeněk Pavlas 2013-03-27 14:17:51 UTC
Created attachment 717109 [details]
add support to unset options, add CURLOPT_RANGE to the list.

Description of problem:

There's no way to remove the HTTP ranges, once set.  Recycling a curl object or calling .reset() method is an option, however pycurl should offer the complete feature set of libcurl, which supports that:  "Pass a NULL to this option to disable the use of ranges."

However, setopt(pycurl.RANGE, None) raises a TypeError exception.  The "unset" code path could be uncommented, and CURLOPT_RANGE added to the list of simple string options.

How reproducible:

Alwasy.

Steps to Reproduce:

>>> import pycurl
>>> c = pycurl.Curl()
>>> c.setopt(pycurl.RANGE, '0-10')
>>> c.setopt(pycurl.RANGE, None)
  
Actual results:

TypeError: invalid arguments to setopt

Expected results:

No error.

Additional info:

Comment 1 Kamil Dudka 2013-04-08 12:40:53 UTC
upstream pull request:

https://github.com/p/pycurl/pull/29

Comment 2 Kamil Dudka 2013-04-09 14:23:16 UTC
fixed in python-pycurl-7.19.0-16.20120408git9b8f4e38.fc20