This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andyshorts
Recipients
Date 2007-06-18.22:28:26
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
While a newbie to Python I would like to point out that RFC2616 (the HTTP/1.1 spec) does allow for byte ranges to be requested and that these could be used to mimic seek &c. In order to do so though the client must retain the file pointer itself etc.

However, given my experience of real world servers you are never sure if the target will support them - it need not - and even if it does proxies (both visible and transparent) are free to utterly trash these requests as they see fit. I've gained this the hard way while writing HTTP client software :-)

The only safe thing to do with HTTP data is treat it as a stream and if you want to seek through it then your choices are:

 a. Buffer it locally and access it that way
 b. Keep opening and closing the resource and reading through to where you want to be.

imo the urllib.urlopen acts in the only sane way possible.

[btw this is my first post so sorry if this is OT - though I notice this thread has gone into torpor]
History
Date User Action Args
2007-08-23 14:52:33adminlinkissue1682241 messages
2007-08-23 14:52:33admincreate