aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/protocol2/http_protocol_mock.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/protocol2/http_protocol_mock.py')
-rw-r--r--libmproxy/protocol2/http_protocol_mock.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/libmproxy/protocol2/http_protocol_mock.py b/libmproxy/protocol2/http_protocol_mock.py
deleted file mode 100644
index dd3643f6..00000000
--- a/libmproxy/protocol2/http_protocol_mock.py
+++ /dev/null
@@ -1,50 +0,0 @@
-"""
-Temporary mock to sort out API discrepancies
-"""
-from libmproxy.protocol.http_wrappers import HTTPResponse, HTTPRequest
-from netlib.http.http1 import HTTP1Protocol
-
-
-class HTTP1(object):
- @staticmethod
- def read_request(connection, *args, **kwargs):
- """
- :type connection: object
- """
- return HTTPRequest.from_protocol(HTTP1Protocol(connection), *args, **kwargs)
-
- @staticmethod
- def read_response(connection, *args, **kwargs):
- """
- :type connection: object
- """
- return HTTPResponse.from_protocol(HTTP1Protocol(connection), *args, **kwargs)
-
- @staticmethod
- def read_http_body(connection, *args, **kwargs):
- """
- :type connection: object
- """
- return HTTP1Protocol(connection).read_http_body(*args, **kwargs)
-
-
- @staticmethod
- def _assemble_response_first_line(*args, **kwargs):
- return HTTP1Protocol()._assemble_response_first_line(*args, **kwargs)
-
-
- @staticmethod
- def _assemble_response_headers(*args, **kwargs):
- return HTTP1Protocol()._assemble_response_headers(*args, **kwargs)
-
-
- @staticmethod
- def read_http_body_chunked(connection, *args, **kwargs):
- """
- :type connection: object
- """
- return HTTP1Protocol(connection).read_http_body_chunked(*args, **kwargs)
-
- @staticmethod
- def assemble(*args, **kwargs):
- return HTTP1Protocol().assemble(*args, **kwargs) \ No newline at end of file