mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fix httpserver for Python 3.
This commit is contained in:
parent
5f1535447c
commit
eff7d5e671
@ -316,6 +316,8 @@ class SupyIndex(SupyHTTPServerCallback):
|
||||
self.send_header('Content-Type', 'text/html; charset=utf-8')
|
||||
self.send_header('Content-Length', len(response))
|
||||
self.end_headers()
|
||||
if sys.version_info[0] >= 3:
|
||||
response = response.encode()
|
||||
self.wfile.write(response)
|
||||
|
||||
class Static(SupyHTTPServerCallback):
|
||||
@ -332,6 +334,8 @@ class Static(SupyHTTPServerCallback):
|
||||
self.send_header('Content-type', self._mimetype)
|
||||
self.send_header('Content-Length', len(response))
|
||||
self.end_headers()
|
||||
if sys.version_info[0] >= 3:
|
||||
response = response.encode()
|
||||
self.wfile.write(response)
|
||||
|
||||
class Favicon(SupyHTTPServerCallback):
|
||||
|
Loading…
Reference in New Issue
Block a user