python3 compatibility for WSGITileServer
@@ -392,7 +392,10 @@ class WSGITileServer:
status_code, headers, content = requestHandler2(self.config, path_info, query_string, script_name)
- return self._response(start_response, status_code, str(content), headers)
+ if not isinstance(content, bytes) and not is_string_type(content):
+ content = str(content)
+
+ return self._response(start_response, status_code, content, headers)
def _response(self, start_response, code, content='', headers=None):
"""
