From 30b2f65935f5bc912725d23e4c05ffcb983f16e7 Mon Sep 17 00:00:00 2001 From: himanshunikhare25 Date: Fri, 10 Mar 2023 11:43:16 +0530 Subject: [PATCH] The mitmproxy API seems to have changed and the syntax is now http.Response.make --- src/main/resources/scripts/proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/scripts/proxy.py b/src/main/resources/scripts/proxy.py index f108b1f..01ab562 100644 --- a/src/main/resources/scripts/proxy.py +++ b/src/main/resources/scripts/proxy.py @@ -150,7 +150,7 @@ def request(self, flow): new_metadata = message_response[0] new_body = message_response[1] - flow.response = http.HTTPResponse.make( + flow.response = http.Response.make( new_metadata['status_code'], new_body, map(convert_headers_to_bytes, new_metadata['headers']) @@ -198,7 +198,7 @@ def response(self, flow): #print("Prepping response!") - flow.response = http.HTTPResponse.make( + flow.response = http.Response.make( new_metadata['status_code'], new_body, map(convert_headers_to_bytes, new_metadata['headers'])