fix(fetchers): enforce RSS body size and timeout limits#107
Merged
chaliy merged 1 commit intoMay 17, 2026
Conversation
chaliy
commented
May 17, 2026
Contributor
Author
chaliy
left a comment
There was a problem hiding this comment.
Reviewed. Applies the bounded-read pattern (read_body_with_timeout + DEFAULT_MAX_BODY_SIZE + BODY_TIMEOUT) the default fetcher uses, honoring FetchOptions.max_body_size. CI green across all 11 checks; RSS + SSRF tests pass locally.
Minor follow-up (non-blocking): the _truncated flag is discarded. The default fetcher propagates it into FetchResponse.truncated; doing the same for RSS would keep the API consistent. Out of scope here.
Generated by Claude Code
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.
Motivation
Description
read_body_with_timeout,BODY_TIMEOUT, andDEFAULT_MAX_BODY_SIZEfrom the default fetcher helpers.response.text()withread_body_with_timeout(response, BODY_TIMEOUT, max_body_size)and convert the returned bytes withString::from_utf8_lossyso feed parsing respectsFetchOptions.max_body_sizeor the default limit.send_request_following_redirectsunchanged to minimize behavioral changes.Testing
cargo fmt --allwhich completed successfully.cargo test -p fetchkit rss_feed -- --nocaptureand all RSS-related tests passed (9 passed; 0 failed).Codex Task