diff options
Diffstat (limited to 'src/hydrilla/proxy/addon.py')
-rw-r--r-- | src/hydrilla/proxy/addon.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/hydrilla/proxy/addon.py b/src/hydrilla/proxy/addon.py index de864fc..d5b0537 100644 --- a/src/hydrilla/proxy/addon.py +++ b/src/hydrilla/proxy/addon.py @@ -105,6 +105,10 @@ class FlowHandling: body = self.flow.response.get_content(strict=False) or b'' return self.bl_response_info.with_body(body) + @property + def full_http_info(self) -> http_messages.FullHTTPInfo: + return http_messages.FullHTTPInfo(self.request_info, self.response_info) + @staticmethod def make( flow: http.HTTPFlow, @@ -234,7 +238,7 @@ class HaketiloAddon: try: parsed_url = url_patterns.parse_url(flow.request.url) except url_patterns.HaketiloURLException as e: - policy = policies.ErrorBlockPolicy(builtin=True, error=e) + policy = policies.ErrorBlockPolicy(error=e) parsed_url = url_patterns.dummy_url else: policy = self.state.select_policy(parsed_url) @@ -338,10 +342,7 @@ class HaketiloAddon: with self.http_safe_event_handling(flow): handling = self.get_flow_handling(flow) - result = handling.policy.consume_response( - request_info = handling.request_info, - response_info = handling.response_info - ) + result = handling.policy.consume_response(handling.full_http_info) if result is not None: headers_bin = result.headers.items_bin() |