python3: Encode ashd-wsgi3 output headers with utf-8 instead of latin-1.
authorFredrik Tolf <fredrik@dolda2000.com>
Thu, 10 Aug 2023 11:18:22 +0000 (13:18 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Thu, 10 Aug 2023 11:18:22 +0000 (13:18 +0200)
python3/ashd-wsgi3

index 2ca259a..c10bfc9 100755 (executable)
@@ -151,7 +151,7 @@ def recode(thing):
     if isinstance(thing, collections.abc.ByteString):
         return thing
     else:
-        return str(thing).encode("latin-1")
+        return str(thing).encode("utf-8")
 
 class request(ashd.serve.wsgirequest):
     def __init__(self, *, bkreq, **kw):