aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/console.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2011-05-15 11:22:35 +1200
committerAldo Cortesi <aldo@nullcube.com>2011-05-15 11:22:35 +1200
commit613e9a298ec2fc82a4811c35f806d129ff883f2a (patch)
tree7c505738f11353fd3d8dff7cedd270f063299725 /libmproxy/console.py
parent6175d92583f564d85ff8a59656977e6372f9dc09 (diff)
downloadmitmproxy-613e9a298ec2fc82a4811c35f806d129ff883f2a.tar.gz
mitmproxy-613e9a298ec2fc82a4811c35f806d129ff883f2a.tar.bz2
mitmproxy-613e9a298ec2fc82a4811c35f806d129ff883f2a.zip
Add a new flow loading mechanism.
We now simulate the normal connection flow when we load flows. That means that we can run scripts, hooks, sticky cookies, etc.
Diffstat (limited to 'libmproxy/console.py')
-rw-r--r--libmproxy/console.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/libmproxy/console.py b/libmproxy/console.py
index 63dbf4f0..9e065e4d 100644
--- a/libmproxy/console.py
+++ b/libmproxy/console.py
@@ -1127,11 +1127,10 @@ class ConsoleMaster(flow.FlowMaster):
try:
f = file(path, "r")
fr = flow.FlowReader(f)
- data = list(fr.stream())
- f.close()
except IOError, v:
return v.strerror
- self.state.load_flows(data)
+ flow.FlowMaster.load_flows(self, fr)
+ f.close()
if self.conn_list_view:
self.sync_list_view()
self.focus_current()