Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.1 KB
Raw Blame

Fixed GenericDownloader building malformed fallback URLs when the .pdf suffix retry kicks in. A bare-host URL like https://pmc.ncbi.nlm.nih.gov/ used to be turned into https://pmc.ncbi.nlm.nih.gov.pdf (.pdf appended to the hostname); the SSRF validator correctly rejected the unresolvable hostname, the download was logged at ERROR, and the URL was logged as URL failed security validation (possible SSRF) even though the fallback is a normal part of the download path. A URL with a query string used to land .pdf after the query separator (?q=1.pdf), producing a malformed URL. The fallback now routes through urlunparse(parsed._replace(path=...)) so the suffix lands in the path component and scheme / netloc / query / fragment / userinfo are preserved verbatim; a bare-host URL becomes https://host/index.pdf.

Also hardened the "already has a .pdf suffix" guard: it now operates on the trailing-slashes-stripped path and is case-insensitive, so paths like paper.pdf/, paper.PDF, and paper.Pdf/ are all recognised as already-suffixed instead of producing paper.pdf.pdf / paper.PDF.pdf on the second pass.