llamacppctl/tests
dschlueter 1b9c08efcb fix(http): force UTF-8 decoding on the SSE chat stream
llama.cpp sends the streaming response as text/event-stream WITHOUT a charset;
requests then does not decode as UTF-8, so iter_lines(decode_unicode=True)
mangled multibyte characters (German Umlaute) into double-encoded garbage
(e.g. "schön" -> "schön"). The non-streaming path via resp.json() was fine.

Set resp.encoding = "utf-8" before iter_lines. Verified live: streamed bytes for
"schön" are now c3 b6 (correct UTF-8), file detected as UTF-8.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 18:47:50 +02:00
..
conftest.py Initial commit: llamacppctl – llama.cpp Docker server control CLI 2026-07-06 16:36:27 +02:00
test_actions.py test: close coverage gaps + opt-in integration smoke 2026-07-06 17:08:10 +02:00
test_cli.py test: close coverage gaps + opt-in integration smoke 2026-07-06 17:08:10 +02:00
test_config.py test: close coverage gaps + opt-in integration smoke 2026-07-06 17:08:10 +02:00
test_docker_ops.py feat: harden and extend the CLI (security, UX, robustness, tests) 2026-07-06 16:57:47 +02:00
test_http_ops.py fix(http): force UTF-8 decoding on the SSE chat stream 2026-07-06 18:47:50 +02:00
test_lock_ops.py Initial commit: llamacppctl – llama.cpp Docker server control CLI 2026-07-06 16:36:27 +02:00
test_prompt_files.py Initial commit: llamacppctl – llama.cpp Docker server control CLI 2026-07-06 16:36:27 +02:00
test_prompt_sources.py Initial commit: llamacppctl – llama.cpp Docker server control CLI 2026-07-06 16:36:27 +02:00
test_prompt_urls.py test: close coverage gaps + opt-in integration smoke 2026-07-06 17:08:10 +02:00