aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/app.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-10-28 09:06:55 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-10-28 09:06:55 +1300
commitf54ed69a358d2dd059bd844c752f96e29e90e269 (patch)
treee2d08e37f36df1bdca22b20b756aaea66562cca6 /libpathod/app.py
parentac5aacce443f619bce2f31a1c016904da1930510 (diff)
downloadmitmproxy-f54ed69a358d2dd059bd844c752f96e29e90e269.tar.gz
mitmproxy-f54ed69a358d2dd059bd844c752f96e29e90e269.tar.bz2
mitmproxy-f54ed69a358d2dd059bd844c752f96e29e90e269.zip
Adjust serve() API.
Diffstat (limited to 'libpathod/app.py')
-rw-r--r--libpathod/app.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpathod/app.py b/libpathod/app.py
index 6cde801a..6f12c0a2 100644
--- a/libpathod/app.py
+++ b/libpathod/app.py
@@ -129,16 +129,16 @@ def _preview(is_request):
s = cStringIO.StringIO()
args["pauses"] = r.preview_safe()
-
+
c = app.config["pathod"].check_policy(r)
if c:
args["error"] = c
return render(template, False, **args)
if is_request:
- r.serve(app.config["pathod"].request_settings, s, host="example.com")
+ r.serve(s, app.config["pathod"].request_settings, host="example.com")
else:
- r.serve(app.config["pathod"].request_settings, s)
+ r.serve(s, app.config["pathod"].request_settings)
args["output"] = utils.escape_unprintables(s.getvalue())
return render(template, False, **args)