diff options
Diffstat (limited to 'src/hydrilla/proxy/addon.py')
-rw-r--r-- | src/hydrilla/proxy/addon.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/hydrilla/proxy/addon.py b/src/hydrilla/proxy/addon.py index 16c2841..06bce86 100644 --- a/src/hydrilla/proxy/addon.py +++ b/src/hydrilla/proxy/addon.py @@ -57,6 +57,7 @@ from ..translations import smart_gettext as _ from ..url_patterns import parse_url from .state_impl import ConcreteHaketiloState from . import policies +from . import http_messages DefaultGetValue = t.TypeVar('DefaultGetValue', object, None) @@ -210,7 +211,7 @@ class HaketiloAddon: with self.http_safe_event_handling(flow): policy = self.get_policy(flow) - request_info = policies.RequestInfo( + request_info = http_messages.RequestInfo( url = parse_url(flow.request.url), method = flow.request.method, headers = MitmproxyHeadersWrapper(flow.request.headers), @@ -220,7 +221,7 @@ class HaketiloAddon: result = policy.consume_request(request_info) if result is not None: - if isinstance(result, policies.ProducedRequest): + if isinstance(result, http_messages.ProducedRequest): flow.request = http.Request.make( url = result.url, method = result.method, @@ -228,7 +229,7 @@ class HaketiloAddon: content = result.body ) else: - # isinstance(result, policies.ProducedResponse) + # isinstance(result, http_messages.ProducedResponse) flow.response = http.Response.make( status_code = result.status_code, headers = http.Headers(result.headers), @@ -260,7 +261,7 @@ class HaketiloAddon: with self.http_safe_event_handling(flow): policy = self.get_policy(flow) - response_info = policies.ResponseInfo( + response_info = http_messages.ResponseInfo( url = parse_url(flow.request.url), status_code = flow.response.status_code, headers = MitmproxyHeadersWrapper(flow.response.headers), |