Skip to content

Fallback to Blob Response Body Size if No Content-Length#381

Merged
Step7750 merged 1 commit intomasterfrom
fix/content-length-fallback
Mar 21, 2026
Merged

Fallback to Blob Response Body Size if No Content-Length#381
Step7750 merged 1 commit intomasterfrom
fix/content-length-fallback

Conversation

@Step7750
Copy link
Member

@Step7750 Step7750 commented Mar 20, 2026

Sometimes Content-Length isn't returned, so we want to fallback.


Note

Low Risk
Low risk: change only affects response-size estimation and adds a safe fallback path when content-length is absent, though it now consumes the response body via blob() in that case.

Overview
Improves calculateResponseSize so it no longer throws when the response lacks a Content-Length header.

When content-length is missing, it now falls back to reading the response as a Blob and using blob.size to compute max_recv_data.

Written by Cursor Bugbot for commit 55e54fc. This will update automatically on new commits. Configure here.

Sometimes `Content-Length` isn't returned, so we want to fallback.
@Step7750 Step7750 requested review from GODrums and hayesZach March 20, 2026 22:00
@Step7750 Step7750 added the bug label Mar 20, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@Step7750 Step7750 merged commit cff6ced into master Mar 21, 2026
3 checks passed
@Step7750 Step7750 deleted the fix/content-length-fallback branch March 21, 2026 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants