aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmproxy/protocol2/http_protocol_mock.py4
-rw-r--r--libmproxy/protocol2/http_proxy.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/libmproxy/protocol2/http_protocol_mock.py b/libmproxy/protocol2/http_protocol_mock.py
index 22f3dc14..dd3643f6 100644
--- a/libmproxy/protocol2/http_protocol_mock.py
+++ b/libmproxy/protocol2/http_protocol_mock.py
@@ -11,14 +11,14 @@ class HTTP1(object):
"""
:type connection: object
"""
- return HTTPRequest.wrap(HTTP1Protocol(connection).read_request(*args, **kwargs))
+ return HTTPRequest.from_protocol(HTTP1Protocol(connection), *args, **kwargs)
@staticmethod
def read_response(connection, *args, **kwargs):
"""
:type connection: object
"""
- return HTTPResponse.wrap(HTTP1Protocol(connection).read_response(*args, **kwargs))
+ return HTTPResponse.from_protocol(HTTP1Protocol(connection), *args, **kwargs)
@staticmethod
def read_http_body(connection, *args, **kwargs):
diff --git a/libmproxy/protocol2/http_proxy.py b/libmproxy/protocol2/http_proxy.py
index 9488e367..ca70b012 100644
--- a/libmproxy/protocol2/http_proxy.py
+++ b/libmproxy/protocol2/http_proxy.py
@@ -1,6 +1,7 @@
from __future__ import (absolute_import, print_function, division)
from .layer import Layer, ServerConnectionMixin
+from .http import HttpLayer
class HttpProxy(Layer, ServerConnectionMixin):