diff --git a/baddiefinder/baddiefinder/web.py b/baddiefinder/baddiefinder/web.py index a2a6303..c299eb9 100644 --- a/baddiefinder/baddiefinder/web.py +++ b/baddiefinder/baddiefinder/web.py @@ -19,9 +19,13 @@ def baddies(): netdb.inspect(p.hook, path) else: netdb.inspect(p.hook) - body = io.BytesIO() + body = io.StringIO() p.write_blocklist(body) - return body + v = body.getvalue() + body.close() + r = flask.Response(v) + r.headers["Content-Type"] = 'text/plain' + return r @app.route("/") def index():