We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add API to programatically create new requests.
Original discussion: https://discourse.mitmproxy.org/t/are-there-any-script-examples-for-creating-a-get-post-put/134

It would be great if we'd have a dedicated API to make new requests from scripts, e.g. `master.new_request()` or something along those lines. This would probably just call `new_request` and then `replay_request`, but this seems useful enough to spell out explicitly.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mitmproxy/flow/master.py`
Content:
```
1 from __future__ import absolute_import, print_function, division
2 
3 import os
4 import sys
5 
6 from typing import Optional  # noqa
7 
8 import netlib.exceptions
9 from mitmproxy import controller
10 from mitmproxy import exceptions
11 from mitmproxy import models
12 from mitmproxy.flow import io
13 from mitmproxy.flow import modules
14 from mitmproxy.onboarding import app
15 from mitmproxy.protocol import http_replay
16 
17 
18 def event_sequence(f):
19     if isinstance(f, models.HTTPFlow):
20         if f.request:
21             yield "request", f
22         if f.response:
23             yield "responseheaders", f
24             yield "response", f
25         if f.error:
26             yield "error", f
27     elif isinstance(f, models.TCPFlow):
28         messages = f.messages
29         f.messages = []
30         f.reply = controller.DummyReply()
31         yield "tcp_open", f
32         while messages:
33             f.messages.append(messages.pop(0))
34             yield "tcp_message", f
35         if f.error:
36             yield "tcp_error", f
37         yield "tcp_close", f
38     else:
39         raise NotImplementedError
40 
41 
42 class FlowMaster(controller.Master):
43 
44     @property
45     def server(self):
46         # At some point, we may want to have support for multiple servers.
47         # For now, this suffices.
48         if len(self.servers) > 0:
49             return self.servers[0]
50 
51     def __init__(self, options, server, state):
52         super(FlowMaster, self).__init__(options)
53         if server:
54             self.add_server(server)
55         self.state = state
56         self.stream_large_bodies = None  # type: Optional[modules.StreamLargeBodies]
57         self.apps = modules.AppRegistry()
58 
59     def start_app(self, host, port):
60         self.apps.add(app.mapp, host, port)
61 
62     def set_stream_large_bodies(self, max_size):
63         if max_size is not None:
64             self.stream_large_bodies = modules.StreamLargeBodies(max_size)
65         else:
66             self.stream_large_bodies = False
67 
68     def duplicate_flow(self, f):
69         """
70             Duplicate flow, and insert it into state without triggering any of
71             the normal flow events.
72         """
73         f2 = f.copy()
74         self.state.add_flow(f2)
75         return f2
76 
77     def create_request(self, method, scheme, host, port, path):
78         """
79             this method creates a new artificial and minimalist request also adds it to flowlist
80         """
81         c = models.ClientConnection.make_dummy(("", 0))
82         s = models.ServerConnection.make_dummy((host, port))
83 
84         f = models.HTTPFlow(c, s)
85         headers = models.Headers()
86 
87         req = models.HTTPRequest(
88             "absolute",
89             method,
90             scheme,
91             host,
92             port,
93             path,
94             b"HTTP/1.1",
95             headers,
96             b""
97         )
98         f.request = req
99         self.load_flow(f)
100         return f
101 
102     def load_flow(self, f):
103         """
104         Loads a flow
105         """
106         if isinstance(f, models.HTTPFlow):
107             if self.server and self.options.mode == "reverse":
108                 f.request.host = self.server.config.upstream_server.address.host
109                 f.request.port = self.server.config.upstream_server.address.port
110                 f.request.scheme = self.server.config.upstream_server.scheme
111         f.reply = controller.DummyReply()
112         for e, o in event_sequence(f):
113             getattr(self, e)(o)
114 
115     def load_flows(self, fr):
116         """
117             Load flows from a FlowReader object.
118         """
119         cnt = 0
120         for i in fr.stream():
121             cnt += 1
122             self.load_flow(i)
123         return cnt
124 
125     def load_flows_file(self, path):
126         path = os.path.expanduser(path)
127         try:
128             if path == "-":
129                 # This is incompatible with Python 3 - maybe we can use click?
130                 freader = io.FlowReader(sys.stdin)
131                 return self.load_flows(freader)
132             else:
133                 with open(path, "rb") as f:
134                     freader = io.FlowReader(f)
135                     return self.load_flows(freader)
136         except IOError as v:
137             raise exceptions.FlowReadException(v.strerror)
138 
139     def replay_request(self, f, block=False):
140         """
141         Replay a HTTP request to receive a new response from the server.
142 
143         Args:
144             f: The flow to replay.
145             block: If True, this function will wait for the replay to finish.
146                 This causes a deadlock if activated in the main thread.
147 
148         Returns:
149             The thread object doing the replay.
150 
151         Raises:
152             exceptions.ReplayException, if the flow is in a state
153             where it is ineligible for replay.
154         """
155 
156         if f.live:
157             raise exceptions.ReplayException(
158                 "Can't replay live flow."
159             )
160         if f.intercepted:
161             raise exceptions.ReplayException(
162                 "Can't replay intercepted flow."
163             )
164         if f.request.raw_content is None:
165             raise exceptions.ReplayException(
166                 "Can't replay flow with missing content."
167             )
168         if not f.request:
169             raise exceptions.ReplayException(
170                 "Can't replay flow with missing request."
171             )
172 
173         f.backup()
174         f.request.is_replay = True
175 
176         f.response = None
177         f.error = None
178 
179         rt = http_replay.RequestReplayThread(
180             self.server.config,
181             f,
182             self.event_queue,
183             self.should_exit
184         )
185         rt.start()  # pragma: no cover
186         if block:
187             rt.join()
188         return rt
189 
190     @controller.handler
191     def log(self, l):
192         self.add_log(l.msg, l.level)
193 
194     @controller.handler
195     def clientconnect(self, root_layer):
196         pass
197 
198     @controller.handler
199     def clientdisconnect(self, root_layer):
200         pass
201 
202     @controller.handler
203     def serverconnect(self, server_conn):
204         pass
205 
206     @controller.handler
207     def serverdisconnect(self, server_conn):
208         pass
209 
210     @controller.handler
211     def next_layer(self, top_layer):
212         pass
213 
214     @controller.handler
215     def error(self, f):
216         self.state.update_flow(f)
217 
218     @controller.handler
219     def request(self, f):
220         if f.live:
221             app = self.apps.get(f.request)
222             if app:
223                 err = app.serve(
224                     f,
225                     f.client_conn.wfile,
226                     **{"mitmproxy.master": self}
227                 )
228                 if err:
229                     self.add_log("Error in wsgi app. %s" % err, "error")
230                 f.reply.kill()
231                 return
232         if f not in self.state.flows:  # don't add again on replay
233             self.state.add_flow(f)
234 
235     @controller.handler
236     def responseheaders(self, f):
237         try:
238             if self.stream_large_bodies:
239                 self.stream_large_bodies.run(f, False)
240         except netlib.exceptions.HttpException:
241             f.reply.kill()
242             return
243 
244     @controller.handler
245     def response(self, f):
246         self.state.update_flow(f)
247 
248     @controller.handler
249     def websockets_handshake(self, f):
250         pass
251 
252     def handle_intercept(self, f):
253         self.state.update_flow(f)
254 
255     def handle_accept_intercept(self, f):
256         self.state.update_flow(f)
257 
258     @controller.handler
259     def tcp_open(self, flow):
260         # TODO: This would break mitmproxy currently.
261         # self.state.add_flow(flow)
262         pass
263 
264     @controller.handler
265     def tcp_message(self, flow):
266         pass
267 
268     @controller.handler
269     def tcp_error(self, flow):
270         pass
271 
272     @controller.handler
273     def tcp_close(self, flow):
274         pass
275
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mitmproxy/flow/master.py b/mitmproxy/flow/master.py
--- a/mitmproxy/flow/master.py
+++ b/mitmproxy/flow/master.py
@@ -187,6 +187,10 @@
             rt.join()
         return rt
 
+    def new_request(self, method, scheme, host, port, path, block=False):
+        f = self.create_request(method, scheme, host, port, path)
+        return self.replay_request(f, block)
+
     @controller.handler
     def log(self, l):
         self.add_log(l.msg, l.level)

{"golden_diff": "diff --git a/mitmproxy/flow/master.py b/mitmproxy/flow/master.py\n--- a/mitmproxy/flow/master.py\n+++ b/mitmproxy/flow/master.py\n@@ -187,6 +187,10 @@\n             rt.join()\n         return rt\n \n+    def new_request(self, method, scheme, host, port, path, block=False):\n+        f = self.create_request(method, scheme, host, port, path)\n+        return self.replay_request(f, block)\n+\n     @controller.handler\n     def log(self, l):\n         self.add_log(l.msg, l.level)\n", "issue": "Add API to programatically create new requests.\nOriginal discussion: https://discourse.mitmproxy.org/t/are-there-any-script-examples-for-creating-a-get-post-put/134\n\nIt would be great if we'd have a dedicated API to make new requests from scripts, e.g. `master.new_request()` or something along those lines. This would probably just call `new_request` and then `replay_request`, but this seems useful enough to spell out explicitly.\n\n", "before_files": [{"content": "from __future__ import absolute_import, print_function, division\n\nimport os\nimport sys\n\nfrom typing import Optional  # noqa\n\nimport netlib.exceptions\nfrom mitmproxy import controller\nfrom mitmproxy import exceptions\nfrom mitmproxy import models\nfrom mitmproxy.flow import io\nfrom mitmproxy.flow import modules\nfrom mitmproxy.onboarding import app\nfrom mitmproxy.protocol import http_replay\n\n\ndef event_sequence(f):\n    if isinstance(f, models.HTTPFlow):\n        if f.request:\n            yield \"request\", f\n        if f.response:\n            yield \"responseheaders\", f\n            yield \"response\", f\n        if f.error:\n            yield \"error\", f\n    elif isinstance(f, models.TCPFlow):\n        messages = f.messages\n        f.messages = []\n        f.reply = controller.DummyReply()\n        yield \"tcp_open\", f\n        while messages:\n            f.messages.append(messages.pop(0))\n            yield \"tcp_message\", f\n        if f.error:\n            yield \"tcp_error\", f\n        yield \"tcp_close\", f\n    else:\n        raise NotImplementedError\n\n\nclass FlowMaster(controller.Master):\n\n    @property\n    def server(self):\n        # At some point, we may want to have support for multiple servers.\n        # For now, this suffices.\n        if len(self.servers) > 0:\n            return self.servers[0]\n\n    def __init__(self, options, server, state):\n        super(FlowMaster, self).__init__(options)\n        if server:\n            self.add_server(server)\n        self.state = state\n        self.stream_large_bodies = None  # type: Optional[modules.StreamLargeBodies]\n        self.apps = modules.AppRegistry()\n\n    def start_app(self, host, port):\n        self.apps.add(app.mapp, host, port)\n\n    def set_stream_large_bodies(self, max_size):\n        if max_size is not None:\n            self.stream_large_bodies = modules.StreamLargeBodies(max_size)\n        else:\n            self.stream_large_bodies = False\n\n    def duplicate_flow(self, f):\n        \"\"\"\n            Duplicate flow, and insert it into state without triggering any of\n            the normal flow events.\n        \"\"\"\n        f2 = f.copy()\n        self.state.add_flow(f2)\n        return f2\n\n    def create_request(self, method, scheme, host, port, path):\n        \"\"\"\n            this method creates a new artificial and minimalist request also adds it to flowlist\n        \"\"\"\n        c = models.ClientConnection.make_dummy((\"\", 0))\n        s = models.ServerConnection.make_dummy((host, port))\n\n        f = models.HTTPFlow(c, s)\n        headers = models.Headers()\n\n        req = models.HTTPRequest(\n            \"absolute\",\n            method,\n            scheme,\n            host,\n            port,\n            path,\n            b\"HTTP/1.1\",\n            headers,\n            b\"\"\n        )\n        f.request = req\n        self.load_flow(f)\n        return f\n\n    def load_flow(self, f):\n        \"\"\"\n        Loads a flow\n        \"\"\"\n        if isinstance(f, models.HTTPFlow):\n            if self.server and self.options.mode == \"reverse\":\n                f.request.host = self.server.config.upstream_server.address.host\n                f.request.port = self.server.config.upstream_server.address.port\n                f.request.scheme = self.server.config.upstream_server.scheme\n        f.reply = controller.DummyReply()\n        for e, o in event_sequence(f):\n            getattr(self, e)(o)\n\n    def load_flows(self, fr):\n        \"\"\"\n            Load flows from a FlowReader object.\n        \"\"\"\n        cnt = 0\n        for i in fr.stream():\n            cnt += 1\n            self.load_flow(i)\n        return cnt\n\n    def load_flows_file(self, path):\n        path = os.path.expanduser(path)\n        try:\n            if path == \"-\":\n                # This is incompatible with Python 3 - maybe we can use click?\n                freader = io.FlowReader(sys.stdin)\n                return self.load_flows(freader)\n            else:\n                with open(path, \"rb\") as f:\n                    freader = io.FlowReader(f)\n                    return self.load_flows(freader)\n        except IOError as v:\n            raise exceptions.FlowReadException(v.strerror)\n\n    def replay_request(self, f, block=False):\n        \"\"\"\n        Replay a HTTP request to receive a new response from the server.\n\n        Args:\n            f: The flow to replay.\n            block: If True, this function will wait for the replay to finish.\n                This causes a deadlock if activated in the main thread.\n\n        Returns:\n            The thread object doing the replay.\n\n        Raises:\n            exceptions.ReplayException, if the flow is in a state\n            where it is ineligible for replay.\n        \"\"\"\n\n        if f.live:\n            raise exceptions.ReplayException(\n                \"Can't replay live flow.\"\n            )\n        if f.intercepted:\n            raise exceptions.ReplayException(\n                \"Can't replay intercepted flow.\"\n            )\n        if f.request.raw_content is None:\n            raise exceptions.ReplayException(\n                \"Can't replay flow with missing content.\"\n            )\n        if not f.request:\n            raise exceptions.ReplayException(\n                \"Can't replay flow with missing request.\"\n            )\n\n        f.backup()\n        f.request.is_replay = True\n\n        f.response = None\n        f.error = None\n\n        rt = http_replay.RequestReplayThread(\n            self.server.config,\n            f,\n            self.event_queue,\n            self.should_exit\n        )\n        rt.start()  # pragma: no cover\n        if block:\n            rt.join()\n        return rt\n\n    @controller.handler\n    def log(self, l):\n        self.add_log(l.msg, l.level)\n\n    @controller.handler\n    def clientconnect(self, root_layer):\n        pass\n\n    @controller.handler\n    def clientdisconnect(self, root_layer):\n        pass\n\n    @controller.handler\n    def serverconnect(self, server_conn):\n        pass\n\n    @controller.handler\n    def serverdisconnect(self, server_conn):\n        pass\n\n    @controller.handler\n    def next_layer(self, top_layer):\n        pass\n\n    @controller.handler\n    def error(self, f):\n        self.state.update_flow(f)\n\n    @controller.handler\n    def request(self, f):\n        if f.live:\n            app = self.apps.get(f.request)\n            if app:\n                err = app.serve(\n                    f,\n                    f.client_conn.wfile,\n                    **{\"mitmproxy.master\": self}\n                )\n                if err:\n                    self.add_log(\"Error in wsgi app. %s\" % err, \"error\")\n                f.reply.kill()\n                return\n        if f not in self.state.flows:  # don't add again on replay\n            self.state.add_flow(f)\n\n    @controller.handler\n    def responseheaders(self, f):\n        try:\n            if self.stream_large_bodies:\n                self.stream_large_bodies.run(f, False)\n        except netlib.exceptions.HttpException:\n            f.reply.kill()\n            return\n\n    @controller.handler\n    def response(self, f):\n        self.state.update_flow(f)\n\n    @controller.handler\n    def websockets_handshake(self, f):\n        pass\n\n    def handle_intercept(self, f):\n        self.state.update_flow(f)\n\n    def handle_accept_intercept(self, f):\n        self.state.update_flow(f)\n\n    @controller.handler\n    def tcp_open(self, flow):\n        # TODO: This would break mitmproxy currently.\n        # self.state.add_flow(flow)\n        pass\n\n    @controller.handler\n    def tcp_message(self, flow):\n        pass\n\n    @controller.handler\n    def tcp_error(self, flow):\n        pass\n\n    @controller.handler\n    def tcp_close(self, flow):\n        pass\n", "path": "mitmproxy/flow/master.py"}], "after_files": [{"content": "from __future__ import absolute_import, print_function, division\n\nimport os\nimport sys\n\nfrom typing import Optional  # noqa\n\nimport netlib.exceptions\nfrom mitmproxy import controller\nfrom mitmproxy import exceptions\nfrom mitmproxy import models\nfrom mitmproxy.flow import io\nfrom mitmproxy.flow import modules\nfrom mitmproxy.onboarding import app\nfrom mitmproxy.protocol import http_replay\n\n\ndef event_sequence(f):\n    if isinstance(f, models.HTTPFlow):\n        if f.request:\n            yield \"request\", f\n        if f.response:\n            yield \"responseheaders\", f\n            yield \"response\", f\n        if f.error:\n            yield \"error\", f\n    elif isinstance(f, models.TCPFlow):\n        messages = f.messages\n        f.messages = []\n        f.reply = controller.DummyReply()\n        yield \"tcp_open\", f\n        while messages:\n            f.messages.append(messages.pop(0))\n            yield \"tcp_message\", f\n        if f.error:\n            yield \"tcp_error\", f\n        yield \"tcp_close\", f\n    else:\n        raise NotImplementedError\n\n\nclass FlowMaster(controller.Master):\n\n    @property\n    def server(self):\n        # At some point, we may want to have support for multiple servers.\n        # For now, this suffices.\n        if len(self.servers) > 0:\n            return self.servers[0]\n\n    def __init__(self, options, server, state):\n        super(FlowMaster, self).__init__(options)\n        if server:\n            self.add_server(server)\n        self.state = state\n        self.stream_large_bodies = None  # type: Optional[modules.StreamLargeBodies]\n        self.apps = modules.AppRegistry()\n\n    def start_app(self, host, port):\n        self.apps.add(app.mapp, host, port)\n\n    def set_stream_large_bodies(self, max_size):\n        if max_size is not None:\n            self.stream_large_bodies = modules.StreamLargeBodies(max_size)\n        else:\n            self.stream_large_bodies = False\n\n    def duplicate_flow(self, f):\n        \"\"\"\n            Duplicate flow, and insert it into state without triggering any of\n            the normal flow events.\n        \"\"\"\n        f2 = f.copy()\n        self.state.add_flow(f2)\n        return f2\n\n    def create_request(self, method, scheme, host, port, path):\n        \"\"\"\n            this method creates a new artificial and minimalist request also adds it to flowlist\n        \"\"\"\n        c = models.ClientConnection.make_dummy((\"\", 0))\n        s = models.ServerConnection.make_dummy((host, port))\n\n        f = models.HTTPFlow(c, s)\n        headers = models.Headers()\n\n        req = models.HTTPRequest(\n            \"absolute\",\n            method,\n            scheme,\n            host,\n            port,\n            path,\n            b\"HTTP/1.1\",\n            headers,\n            b\"\"\n        )\n        f.request = req\n        self.load_flow(f)\n        return f\n\n    def load_flow(self, f):\n        \"\"\"\n        Loads a flow\n        \"\"\"\n        if isinstance(f, models.HTTPFlow):\n            if self.server and self.options.mode == \"reverse\":\n                f.request.host = self.server.config.upstream_server.address.host\n                f.request.port = self.server.config.upstream_server.address.port\n                f.request.scheme = self.server.config.upstream_server.scheme\n        f.reply = controller.DummyReply()\n        for e, o in event_sequence(f):\n            getattr(self, e)(o)\n\n    def load_flows(self, fr):\n        \"\"\"\n            Load flows from a FlowReader object.\n        \"\"\"\n        cnt = 0\n        for i in fr.stream():\n            cnt += 1\n            self.load_flow(i)\n        return cnt\n\n    def load_flows_file(self, path):\n        path = os.path.expanduser(path)\n        try:\n            if path == \"-\":\n                # This is incompatible with Python 3 - maybe we can use click?\n                freader = io.FlowReader(sys.stdin)\n                return self.load_flows(freader)\n            else:\n                with open(path, \"rb\") as f:\n                    freader = io.FlowReader(f)\n                    return self.load_flows(freader)\n        except IOError as v:\n            raise exceptions.FlowReadException(v.strerror)\n\n    def replay_request(self, f, block=False):\n        \"\"\"\n        Replay a HTTP request to receive a new response from the server.\n\n        Args:\n            f: The flow to replay.\n            block: If True, this function will wait for the replay to finish.\n                This causes a deadlock if activated in the main thread.\n\n        Returns:\n            The thread object doing the replay.\n\n        Raises:\n            exceptions.ReplayException, if the flow is in a state\n            where it is ineligible for replay.\n        \"\"\"\n\n        if f.live:\n            raise exceptions.ReplayException(\n                \"Can't replay live flow.\"\n            )\n        if f.intercepted:\n            raise exceptions.ReplayException(\n                \"Can't replay intercepted flow.\"\n            )\n        if f.request.raw_content is None:\n            raise exceptions.ReplayException(\n                \"Can't replay flow with missing content.\"\n            )\n        if not f.request:\n            raise exceptions.ReplayException(\n                \"Can't replay flow with missing request.\"\n            )\n\n        f.backup()\n        f.request.is_replay = True\n\n        f.response = None\n        f.error = None\n\n        rt = http_replay.RequestReplayThread(\n            self.server.config,\n            f,\n            self.event_queue,\n            self.should_exit\n        )\n        rt.start()  # pragma: no cover\n        if block:\n            rt.join()\n        return rt\n\n    def new_request(self, method, scheme, host, port, path, block=False):\n        f = self.create_request(method, scheme, host, port, path)\n        return self.replay_request(f, block)\n\n    @controller.handler\n    def log(self, l):\n        self.add_log(l.msg, l.level)\n\n    @controller.handler\n    def clientconnect(self, root_layer):\n        pass\n\n    @controller.handler\n    def clientdisconnect(self, root_layer):\n        pass\n\n    @controller.handler\n    def serverconnect(self, server_conn):\n        pass\n\n    @controller.handler\n    def serverdisconnect(self, server_conn):\n        pass\n\n    @controller.handler\n    def next_layer(self, top_layer):\n        pass\n\n    @controller.handler\n    def error(self, f):\n        self.state.update_flow(f)\n\n    @controller.handler\n    def request(self, f):\n        if f.live:\n            app = self.apps.get(f.request)\n            if app:\n                err = app.serve(\n                    f,\n                    f.client_conn.wfile,\n                    **{\"mitmproxy.master\": self}\n                )\n                if err:\n                    self.add_log(\"Error in wsgi app. %s\" % err, \"error\")\n                f.reply.kill()\n                return\n        if f not in self.state.flows:  # don't add again on replay\n            self.state.add_flow(f)\n\n    @controller.handler\n    def responseheaders(self, f):\n        try:\n            if self.stream_large_bodies:\n                self.stream_large_bodies.run(f, False)\n        except netlib.exceptions.HttpException:\n            f.reply.kill()\n            return\n\n    @controller.handler\n    def response(self, f):\n        self.state.update_flow(f)\n\n    @controller.handler\n    def websockets_handshake(self, f):\n        pass\n\n    def handle_intercept(self, f):\n        self.state.update_flow(f)\n\n    def handle_accept_intercept(self, f):\n        self.state.update_flow(f)\n\n    @controller.handler\n    def tcp_open(self, flow):\n        # TODO: This would break mitmproxy currently.\n        # self.state.add_flow(flow)\n        pass\n\n    @controller.handler\n    def tcp_message(self, flow):\n        pass\n\n    @controller.handler\n    def tcp_error(self, flow):\n        pass\n\n    @controller.handler\n    def tcp_close(self, flow):\n        pass\n", "path": "mitmproxy/flow/master.py"}]}