Hal De 4 gadi atpakaļ
vecāks
revīzija
0d23e8ccd3
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      app/app.py

+ 1 - 1
app/app.py

@@ -120,7 +120,7 @@ class AuthMiddleware:
           body = bytes('scope: {}'.format(pformat(getmembers(scope), indent=1)), 'utf-8')
           await send({'type': 'http.response.start',
                       'status': 200,
-                      'headers': [(b'content-length', bytes(str(len(body))))]})
+                      'headers': [(b'content-length', bytes(str(len(body)), 'utf-8'))]})
           await send({'type': 'http.response.body',
                       'body': body,
                       'more_body': False})