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.0 KB
Raw Blame

safe_post and SafeSession no longer re-send the request body when a 307 or 308 redirect leaves the scope of the URL the caller addressed. Those two status codes preserve the method and the body, so whatever was posted travelled to whatever host the Location header named: the search engines sent the user's query on, and api/client.py sends a username and password to its login endpoint. Credential headers are already dropped on such a hop (#6139), but a body cannot be dropped without sending a different request than the one the server asked us to repeat, so the hop is refused with a ValueError instead. A 307 or 308 within the same scheme, host and port still carries the body, a request with no body is unaffected, and 301/302/303 already downgraded to GET and left the body behind.

The refusal applies to a hop that is about to be followed. With allow_redirects=False nothing is sent, so the 3xx response is returned to the caller as before and only the credential headers are dropped from the Response.next it carries.