Bug 928370 - [RFE] support setopt(pycurl.RANGE, None)
Summary: [RFE] support setopt(pycurl.RANGE, None)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pycurl
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-27 14:17 UTC by Zdeněk Pavlas
Modified: 2014-02-02 22:29 UTC (History)
2 users (show)

Fixed In Version: python-pycurl-7.19.0-16.20120408git9b8f4e38.fc20
Clone Of:
Environment:
Last Closed: 2013-04-09 14:23:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
add support to unset options, add CURLOPT_RANGE to the list. (738 bytes, patch)
2013-03-27 14:17 UTC, Zdeněk Pavlas
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.