]> www.dolda2000.com Git - ashd.git/blobdiff - python3/ashd-wsgi3
call[fs]cgi: Handle serialized child connections asynchronously.
[ashd.git] / python3 / ashd-wsgi3
index fa0b8b590d2f71cecd4afbaa1fe989af0927432d..c10bfc93cc4933687634b902e6c9cc6c7f69076d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/python3
 
-import sys, os, getopt, socket, logging, time, locale, collections, signal
+import sys, os, getopt, socket, logging, time, locale, collections.abc, signal
 import ashd.util, ashd.serve, ashd.htlib
 try:
     import pdm.srv
@@ -148,10 +148,10 @@ def mkenv(req):
     return env
 
 def recode(thing):
-    if isinstance(thing, collections.ByteString):
+    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):