diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-05-15 11:22:35 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-05-15 11:22:35 +1200 |
commit | 613e9a298ec2fc82a4811c35f806d129ff883f2a (patch) | |
tree | 7c505738f11353fd3d8dff7cedd270f063299725 /libmproxy/console.py | |
parent | 6175d92583f564d85ff8a59656977e6372f9dc09 (diff) | |
download | mitmproxy-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.py | 5 |
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() |