Repository navigation
Conversation
vsaraikin
force-pushed
the
http-exists-range
branch
from
October 8, 2026 09:20
bdd89f8 to
907e25c
Compare
Member
|
How sure can we be that servers will accept the Range header; i.e., we know that some servers don't process the header at all, but might they throw an error because it's there?
That would be true even for an empty body; but are you sure it isn't cleared when the connection goes out of scope? |
Author
|
vsaraikin
force-pushed
the
http-exists-range
branch
from
October 8, 2026 21:15
907e25c to
a2bd4d2
Compare
vsaraikin
force-pushed
the
http-exists-range
branch
from
October 17, 2026 15:15
a2bd4d2 to
7d24b6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HTTPFileSystem._existssends a plainGETand closes the response without reading it. The server starts sending the whole file, and since the body is left unread aiohttp cannot return the connection to the pool, so every call opens a new connection, and a new TLS handshake over HTTPS. Against a local server with a 1 MB file:It now sends
Range: bytes=0-0. A server that supports ranges answers 206 with one byte, which is read so the connection is reused. A server that ignores the header answers 200 as before. An empty file answers 416, which still means it exists. It stays aGETrather than aHEAD, since signed URLs are usually only valid forGET.The test server now answers 416 for a range on an empty file, as real servers do.
test_exists_requests_one_bytefails on master