Skip to content

DM-56138: Fix detection of byte range support for http - #158

Merged
timj merged 3 commits into
mainfrom
tickets/DM-56138
Sep 18, 2026
Merged

timj merged 3 commits into
mainfrom
tickets/DM-56138

Conversation

@timj

@timj timj commented Sep 17, 2026

Copy link
Copy Markdown
Member

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov

codecov Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.44068% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.48%. Comparing base (8f9d513) to head (252ff88).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
tests/test_http.py 87.50% 3 Missing and 3 partials ⚠️
python/lsst/resources/http.py 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #158      +/-   ##
==========================================
+ Coverage   83.46%   83.48%   +0.01%     
==========================================
  Files          38       38              
  Lines        8112     8167      +55     
  Branches      975      981       +6     
==========================================
+ Hits         6771     6818      +47     
- Misses       1044     1048       +4     
- Partials      297      301       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

timj and others added 2 commits September 17, 2026 15:27
A presigned S3 URL is signed for a single method, so the HEAD used to
probe for range support is emulated with a one-byte ranged GET. That
request is answered with 206, but only 200 was recognized, so opening
such a URL fell back to reading the entire resource into memory.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The one-byte ranged GET that probes for range support reports the total
size of the resource in its Content-Range header, but the handle
discarded it and asked the server again the first time a seek relative
to the end needed a size.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@timj
timj marked this pull request as ready for review September 17, 2026 22:30

@dhirving dhirving left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@timj
timj merged commit 8cfad5a into main Sep 18, 2026
25 checks passed
@timj
timj deleted the tickets/DM-56138 branch September 18, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants