mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-17 23:52:29 +00:00
When fetch_url fetches a PDF URL, the content was returned as garbled binary because BeautifulSoup's HTML parser corrupted the PDF bytes. Add three-layer PDF detection: - Fast-path for URLs ending in .pdf (case-insensitive) - Content-Type header detection in async SafeWebBaseLoader._fetch - %PDF binary content fallback in get_content_from_url Includes SSRF protection via validate_url(), streaming download with Content-Length pre-check, 50 MB size limit, and proper session management. No new dependencies (pypdf already in requirements.txt). Closes #23841 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| data | ||
| open_webui | ||
| tests/retrieval | ||
| .dockerignore | ||
| .gitignore | ||
| dev.sh | ||
| requirements-min.txt | ||
| requirements.txt | ||
| start.sh | ||
| start_windows.bat | ||