From c04fa1b233224d28e85be34ab5b6a8718497488c Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 16 Aug 2015 12:52:34 +0200 Subject: minor fixes --- libmproxy/protocol2/http_protocol_mock.py | 4 ++-- libmproxy/protocol2/http_proxy.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'libmproxy') 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): -- cgit v1.2.3