Martin v. Löwis wrote:
>> given that urllib2 already supports partial requests, I'm not sure I see
>> the point of reimplementing this on top of httplib. an example:
>>
>> import urllib2
>>
>> request = urllib2.Request("http://www.pythonware.com/daily/index.htm")
>> request.add_header("range", "bytes=0-999")
>
> But what does this do if the URL was a file URL, or an ftp URL?
same thing as if you use range on a HTTP server that doesn't support
ranges. you get all the data, and there's no content-range field in
the response header.
> You have to know the syntax of the range header, and you have to
> know the syntax of the content-range header, to process it. With
> that, you can just as easily use httplib:
I'm not sure "as easily" is the right way to describe something that
requires more code but yet leaves out practical things as redirection
support, host and user-agent headers, etc.
</F>
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com