cluster-dns: Writes bytes on response

In Python3, strings are unicode, while in Python2 they're bytes. This causes an issue when writing the request response, since it expects bytes.
This commit is contained in:
Claudiu Belu 2019-03-20 16:19:55 +02:00 committed by GitHub
parent f0341a6f2a
commit ee0cf55804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class HTTPHandler(BaseHTTPRequestHandler):
self.send_response(200)
self.send_header('Content-type','text/html')
self.end_headers()
self.wfile.write("Hello World!")
self.wfile.write(b"Hello World!")
try:
# Create a web server and define the handler to manage the incoming request.