-
-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
Summary
The githubhttps:// protocol is mishandled in ContentFetcher.fetch_content, causing the unstripped full URL to be passed to _fetch_github_https_file which expects owner/repo/branch/path.
Details
- File: struct_module/content_fetcher.py
- Current logic special-cases content_location.startswith("http") and bypasses prefix stripping, so "githubhttps://..." is forwarded incorrectly.
Proposed fix
- Match and handle explicit prefixes in deterministic order before any generic http/https branch.
- Only treat raw "https://" as an HTTP URL; for "githubhttps://", strip the prefix and route to _fetch_github_https_file with owner/repo/branch/path.
- Add unit tests covering github://, githubhttps://, githubssh://, and https:// to avoid regressions.
Acceptance criteria
- githubhttps://owner/repo/branch/path fetches the expected content without errors.
- Existing protocols (file://, github://, githubssh://, https://) continue to work.
- Tests added passing in CI.
Metadata
Metadata
Assignees
Labels
No labels