aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/app.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-02 12:53:12 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-02 12:53:12 +1200
commit31012d782f64727de1d86662139e9ec6618043c5 (patch)
tree3887c8e11e30a758e82afdabe764a5e5f4f13e8d /pathod/app.py
parent3d9dbd6a4940cc7fe6f65cbb257aaeacd1eab1ee (diff)
downloadmitmproxy-31012d782f64727de1d86662139e9ec6618043c5.tar.gz
mitmproxy-31012d782f64727de1d86662139e9ec6618043c5.tar.bz2
mitmproxy-31012d782f64727de1d86662139e9ec6618043c5.zip
Consolidate some functions to strutils.bytes_to_escaped_str
Diffstat (limited to 'pathod/app.py')
-rw-r--r--pathod/app.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pathod/app.py b/pathod/app.py
index 7e9860b9..e3216c58 100644
--- a/pathod/app.py
+++ b/pathod/app.py
@@ -3,8 +3,9 @@ import pprint
import io
import copy
from flask import Flask, jsonify, render_template, request, abort, make_response
-from . import version, language, utils
+from . import version, language
from netlib.http import user_agents
+from netlib import strutils
logging.basicConfig(level="DEBUG")
EXAMPLE_HOST = "example.com"
@@ -166,7 +167,7 @@ def make_app(noapi, debug):
settings.websocket_key = EXAMPLE_WEBSOCKET_KEY
language.serve(safe, s, settings)
- args["output"] = utils.escape_unprintables(s.getvalue())
+ args["output"] = strutils.bytes_to_escaped_str(s.getvalue())
return render(template, False, **args)
@app.route('/response_preview')