Skip to content

fix: add follow_redirects and timeout to URL attachment fetching#1421

Open
mitre88 wants to merge 1 commit into
simonw:mainfrom
mitre88:fix-url-attachment-fetch
Open

fix: add follow_redirects and timeout to URL attachment fetching#1421
mitre88 wants to merge 1 commit into
simonw:mainfrom
mitre88:fix-url-attachment-fetch

Conversation

@mitre88
Copy link
Copy Markdown

@mitre88 mitre88 commented Apr 26, 2026

Adds follow_redirects=True and timeout=30.0 to httpx.get and httpx.head in Attachment.content_bytes() and resolve_type(), preventing hangs and redirect failures when loading remote images via URL.

URL-based attachments were failing on redirects or hanging on
slow connections because httpx.get/head lacked explicit parameters.
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