Repository navigation
Conversation
|
This PR is stale because it has been open for 30 days with no activity. |
|
@DavidBord Thanks! I think built-in range support is going to be helpful |
|
It’s needed to resume downloads and this may significantly reduce load in some cases. That’s why even minimal busybox httpd has a support of Range requests |
|
This PR is stale because it has been open for 30 days with no activity. |
|
This is a most welcome update. Thank you @DavidBord |
|
Personally I think it's fundamental to support Others I think are OK. I'm using a modified version of this patch in my program https://github.com/imba-tjd/qrsend. I will share info when I found defects. |
| shutil.copyfileobj(source, outputfile) | ||
| if start_byte is not None and end_byte is not None: | ||
| source.seek(start_byte) | ||
| outputfile.write(source.read(end_byte)) |
There was a problem hiding this comment.
Fatal error. When you use 2-5, the start_byte is 2 and end_byte is 5. Then you read(5).
The correct behavior is read(4), which is end_byte-start_byte+1. Though I won't suggest whether putting +1 here or previous place.
More importantly, read() will load all data into memory in a row before start writing. This has serious performance issue when resuming large file. I tried source.truncate() but it turns out an io.UnsupportedOperation.
Besides Content-Length needs changing too. So that new testing is recommended to be added, too.
|
Is there a way to help reviewing this PR? I'd like to help. |
There was another PR which was detailed discussed. However it seems to be deleted. Maybe it will be recoverd. This PR is poorly implemented and can be closed IMO. |
|
You can use |
|
This PR is stale because it has been open for 30 days with no activity. |
87935c0 to
a89f588
Compare
|
I went through the review feedback on this PR. |
Documentation build overview
418 files changed ·
|
cd2dfba to
1aedfad
Compare
|
Closing this was the wrong decision, closing #118949 instead and keeping this alive. |
Co-authored-by: Muse Code (Meta Muse Spark) # Conflicts: # Doc/whatsnew/3.16.rst # Lib/http/server.py
Hi, I'm the author of #118949. Much more disscussion is done there. Maybe we should coauthor this if you took code pieces there?
It's Microsoft somehow banning my GitHub account by mistake and took down that. Now it's back. |
https://bugs.python.org/issue42643