What's new in v0.50.19
Fix: Workspace files with Chinese/Unicode filenames no longer crash on download
Clicking a PDF or other workspace file whose name contains Chinese, Japanese, Arabic, or other non-ASCII characters caused a UnicodeEncodeError crash. Python's HTTP server requires all header values to be latin-1 encodable; the previous code passed the raw Unicode filename directly into the Content-Disposition header.
New behaviour: A dedicated helper builds the header correctly:
- ASCII fallback in
filename="..."(non-ASCII chars replaced with_) - Full UTF-8 name preserved in
filename*=UTF-8''...per RFC 5987 - CR/LF stripped (header injection guard)
- Empty results fall back to
"download"or"download.ext"
Both download (attachment) and inline responses are fixed.
924 tests | Full changelog