diff options
author | Marcelo Glezer <mg@tekii.com.ar> | 2015-02-11 16:05:49 -0300 |
---|---|---|
committer | Marcelo Glezer <mg@tekii.com.ar> | 2015-02-11 16:05:49 -0300 |
commit | 493cecfaf27f7680c8acaaa88a467fc016a00bf8 (patch) | |
tree | 3d9cc4956a1a15f10bf5847fb4c94311bafd2899 | |
parent | 1df78f75c5ceb368ca9ba9d1b01e17af21cab892 (diff) | |
download | mitmproxy-493cecfaf27f7680c8acaaa88a467fc016a00bf8.tar.gz mitmproxy-493cecfaf27f7680c8acaaa88a467fc016a00bf8.tar.bz2 mitmproxy-493cecfaf27f7680c8acaaa88a467fc016a00bf8.zip |
renamed add_request to create_request and added a tiny docstring
-rw-r--r-- | libmproxy/console/flowlist.py | 2 | ||||
-rw-r--r-- | libmproxy/flow.py | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libmproxy/console/flowlist.py b/libmproxy/console/flowlist.py index 8dfaba95..7d511682 100644 --- a/libmproxy/console/flowlist.py +++ b/libmproxy/console/flowlist.py @@ -267,7 +267,7 @@ class FlowListBox(urwid.ListBox): def new_request(self, url, method): try: scheme, host, port, path = http.parse_url(url) - f = self.master.add_request(method, scheme, host, port, path) + f = self.master.create_request(method, scheme, host, port, path) self.master.view_flow(f) except ValueError: self.master.statusbar.message("Invalid Url") diff --git a/libmproxy/flow.py b/libmproxy/flow.py index e9d90916..42fc36cc 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -763,7 +763,13 @@ class FlowMaster(controller.Master): def duplicate_flow(self, f): return self.load_flow(f.copy()) - def add_request(self, method, scheme, host, port, path): + def create_request(self, method, scheme, host, port, path): + """ + Creates a new request from params and add it to flow list. + created request is empty (except for method and url) but is able + to be replayed + + """ f = http.HTTPFlow(None,None); headers = ODictCaseless() |