Skip to content

fix: accept unknown-size Content-Range values#5120

Open
trivikr wants to merge 3 commits intonodejs:mainfrom
trivikr:content-range-bytes-unknown-length
Open

fix: accept unknown-size Content-Range values#5120
trivikr wants to merge 3 commits intonodejs:mainfrom
trivikr:content-range-bytes-unknown-length

Conversation

@trivikr
Copy link
Copy Markdown
Member

@trivikr trivikr commented Apr 26, 2026

This relates to...

Fixes: #5119

Rationale

Content-Range values such as bytes 3-5/* are valid when the complete representation length is unknown.
The retry resume path previously rejected these headers as a Content-Range mismatch, which could fail otherwise valid resumable 206 Partial Content responses.

Changes

  • Accept * as the complete length in Content-Range byte ranges.
  • Parse unknown complete length as size: null.

Features

N/A

Bug Fixes

Accept unknown-size Content-Range values

Breaking Changes and Deprecations

N/A

Status

Assisted-by: openai:gpt-5.5

Assisted-by: openai:gpt-5.5
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.14%. Comparing base (9a6e313) to head (c7f3c10).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5120   +/-   ##
=======================================
  Coverage   93.14%   93.14%           
=======================================
  Files         110      110           
  Lines       36117    36117           
=======================================
  Hits        33642    33642           
  Misses       2475     2475           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread test/retry-handler.js Outdated
@trivikr trivikr requested a review from mcollina April 26, 2026 16:09
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.

Content-Range parser rejects valid unknown-size byte ranges

3 participants