Skip to content

Fixed: Reject overflowing Content-Length in webfetch#40

Merged
Sewer56 merged 1 commit into
mainfrom
fix/content-length-cast
Feb 27, 2026
Merged

Fixed: Reject overflowing Content-Length in webfetch#40
Sewer56 merged 1 commit into
mainfrom
fix/content-length-cast

Conversation

@Sewer56
Copy link
Copy Markdown
Member

@Sewer56 Sewer56 commented Feb 27, 2026

Summary

  • Fail fast when Content-Length exceeds platform usize in both blocking and tokio webfetch.
  • Use checked conversion instead of silent fallback, avoiding unnecessary downloads on 32-bit targets.

Fail fast on 32-bit overflow in blocking and tokio paths.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 27, 2026

Warning

Rate limit exceeded

@Sewer56 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 58 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5c8d961 and 3c6482a.

📒 Files selected for processing (2)
  • src/llm-coding-tools-core/src/tools/webfetch/blocking_impl.rs
  • src/llm-coding-tools-core/src/tools/webfetch/tokio_impl.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/content-length-cast

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 45.45455% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.91%. Comparing base (5c8d961) to head (3c6482a).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...ing-tools-core/src/tools/webfetch/blocking_impl.rs 50.00% 3 Missing ⚠️
...coding-tools-core/src/tools/webfetch/tokio_impl.rs 40.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
- Coverage   75.10%   74.91%   -0.19%     
==========================================
  Files          67       67              
  Lines        1976     1985       +9     
==========================================
+ Hits         1484     1487       +3     
- Misses        492      498       +6     
Flag Coverage Δ
unittests 74.91% <45.45%> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ing-tools-core/src/tools/webfetch/blocking_impl.rs 92.85% <50.00%> (-7.15%) ⬇️
...coding-tools-core/src/tools/webfetch/tokio_impl.rs 91.66% <40.00%> (-8.34%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Sewer56 Sewer56 merged commit 348806a into main Feb 27, 2026
7 of 8 checks passed
@Sewer56 Sewer56 deleted the fix/content-length-cast branch February 27, 2026 21:35
Sewer56 added a commit that referenced this pull request Mar 30, 2026
Fixed: Reject overflowing Content-Length in webfetch
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.

1 participant