adding support for http byte range in http_common.do_http #1193

Open
opened 2010-09-03 16:40:11 +00:00 by guyzmo · 2 comments
guyzmo commented 2010-09-03 16:40:11 +00:00
Owner

I'm using the same API as tahoe-get.py and I needed to have 'very big files' supported through that API. So I patched do_http() so it has a headers dictionary as parameter in which one can add different options.

I patched also tahoe_get.get() so it supports Partial Content answers (206), and added a 'frange' variable set to None, because I didn't know what CLI option to choose for content retrieval, and did not want to change cli.py. frange shall be a list (or tuple) of two elements :

start = 12
end = 42
frange=[start, end]
I'm using the same API as tahoe-get.py and I needed to have 'very big files' supported through that API. So I patched do_http() so it has a headers dictionary as parameter in which one can add different options. I patched also tahoe_get.get() so it supports Partial Content answers (206), and added a 'frange' variable set to None, because I didn't know what CLI option to choose for content retrieval, and did not want to change cli.py. frange shall be a list (or tuple) of two elements : ``` start = 12 end = 42 frange=[start, end] ```
tahoe-lafs added the
code-frontend-cli
major
enhancement
1.8β
labels 2010-09-03 16:40:11 +00:00
tahoe-lafs added this to the undecided milestone 2010-09-03 16:40:11 +00:00
guyzmo commented 2010-09-03 16:40:37 +00:00
Author
Owner

Attachment patch (862 bytes) added

the actual patch

**Attachment** patch (862 bytes) added the actual patch
862 B
zooko commented 2010-09-06 06:55:35 +00:00
Author
Owner

Dear guyzmo:

Thank you for the patch! To accept it into trunk, it needs a unit test. I'm not sure, but I think [right here]source:trunk/src/allmydata/test/test_cli.py@4707#L2332 would be a good place to test this functionality.

Dear guyzmo: Thank you for the patch! To accept it into trunk, it needs a unit test. I'm not sure, but I think [right here]source:trunk/src/allmydata/test/test_cli.py@4707#L2332 would be a good place to test this functionality.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/trac-2024-07-25#1193
No description provided.